Ontario has announced $25 million in new funding over the next four years to help curb a recent spike in gun and gang violence in Toronto and prevent violent offenders from getting bail.

The announcement, first reported by CTV News Toronto on Monday, was made official by Premier Doug Ford on Thursday.

The funding will be distributed in two parts over four years, he said.

The first $7.6 million will be reserved for dedicated “legal SWAT teams” that will focus on limiting suspects accused in gun-related crimes from being granted bail.

According to a government news release, the teams will be stationed at each courthouse in the city and will be led by a Crown Attorney. A “new team of bail compliance officers” will also be appointed to help ensure those out on bail are not violating the terms of their release.

Another $18 million will go toward equipping the Toronto Police Service with the “digital, investigative and analytical resources” needed to investigate incidents involving guns.

The funding, Ford said, was allocated in part after consultations with Toronto Police Chief Mark Saunders and front-line officers and goes “above and beyond” the existing $76 million Toronto Police Service budget.

“This is real money, critical funding targeting the area of greatest need, priority areas that were identified in consultations with Chief Mark Saunders and other members of the Toronto Police Service,” he said.

“We believe that the chief knows best. He knows where the resources are most needed. Chief Saunders and his team are out every single day, on the front lines keeping Toronto safe and that’s what we believe in listening to.”

Last month, as part of a city effort to quell gun crime, Saunders announced that the service would deploy nearly 200 additional front-line officers during peak hours this summer.

The beefed up police presence comes at a cost of $3 million to the city.

In a statement, Saunders commended Ford and his government for the move.

“Part of our strategy to address gun violence in the city includes partnering with the provincial government for a collaborative and meaningful response," Saunders wrote in a government news release. "With today's announcement, Premier Ford and his government have listened to our concerns and have invested in the Toronto Police Service, giving us the ability to be surgical with apprehending those who use guns and ensuring the courts have the resources they need to deal with violent criminals."

Ford is asking the federal government to match the province's investment, though the allocation of the funding is not dependent on that.

“The feds must do more and the city must step forward, starting with following through on their commitment to hire more police officers,” he said. “We have to refocus all our resources on going after the bad guys, not the good guys… So tell the bad guys out there, we’re coming to get you.”

The news comes on the heels of a letter penned by Mayor John Tory to Prime Minister Justin Trudeau, renewing his call for bail reforms and stricter firearms laws.

In the letter, distributed Monday, Tory urged the federal government to work with the city on a number initiatives aimed at addressing the violence.

Tory has repeatedly looked to all levels of government to provide Toronto with increased funding to tackle the predominately gang-related violence.

Last month, he asked the federal government for help funding a portion of the city's "gun violence reduction plan,” which already sees $12 million of city investment in a slew of community-focused initiatives for youth and at-risk communities.

Following Ford’s announcement, Tory thanked the provincial government for the investment, calling the funding “a pressing need.”

He said he has already been in touch with city officials and has been told that they have delegated authority from council to match the province’s contribution for the remainder of 2018. The extension of funding past 2018 would rest on the next city council which will be elected in the fall.

Tory also reiterated his plea to the federal government to ban the sale and possession of handguns in the city, calling it an essential part of a “balanced approach” to the solution.

When asked whether he would support a ban on handguns in Toronto, Ford said he would not, saying there are a number of "responsible gun owners" who do not need to be banned.

Ford also quashed the suggestion that the money could be used to revive the controversial TAVIS program – something he has been supportive of in the past.

Pointing to his consultations with Saunders, Ford said that it is “not up to the premier” to decide how cities should answer to gun crime.

“No, we aren’t going to have TAVIS. We are going to focus on guns and gangs and we have all the faith in the world in the chief and the police association needs their input too,” he said.

“We aren’t experts. The experts are the police. We are going to hand over the money and they are going to tell us where the money should go.”

Concerns about the growing number of shootings in Toronto came to a boiling point in June when two young girls were struck by stray bullets while playing on a Scarborough playground.

The August 22 mass shooting on Danforth Avenue compounded the sense of urgency among the public for more to be done to prevent gun-related deaths.

Toronto Police Association President Mike McCormack said that while the announcement is a “step in the right direction,” staffing issues are still a concern.

“We are having discussions with the mayor, who has promised to hire 200 additional officers. But we’re encouraged by the premier,” he said.

“We have been raising these types of issues with the previous government and again, we find ourselves in this unfortunate state in the city of Toronto where we’ve seen an increase in gun violence, an increase in shooting victims. We need action and that’s what we’ve been calling for, action, and this government is giving us action on these points.”