TORONTO - The federal government will spend $26 million this year on Ontario refugee and immigration legal aid services after the province cut funding, the prime minister announced Monday, while taking partisan pre-election digs at the premier.

Premier Doug Ford's spring budget slashed Legal Aid Ontario's budget by 30 per cent, including eliminating funding for refugee and immigration law services. His Progressive Conservative government maintained that Ottawa should pay those costs because immigration is a federal responsibility.

Prime Minister Justin Trudeau said responsibility for legal aid for immigration and refugee cases has long been a joint federal-provincial responsibility, but the Ford government “decided to step away from that.”

“The fact that we have to be here today to recognize that yet another Conservative government, the government of Doug Ford, is walking away from services to the most vulnerable is really frustrating for me and I think for all Canadians,” Trudeau said.

Trudeau has increasingly been slamming Ford ahead of the October election, and his Liberal government also previously stepped in to fund a provincial tree planting program after it was cut by Ontario.

“There are many other cuts that the Conservative government is making that the federal government will not be able to compensate for,” Trudeau said. “That is something that Canadians need to be very mindful of as we go to the polls this fall.”

Ontario's attorney general had been asking Ottawa to foot the bill for refugee and immigration legal aid, saying the Trudeau government's immigration policies have led to a nearly 160 per cent increase in refugee claims in Ontario since 2013.

Doug Downey said Monday that it's unfortunate the federal government waited for several months before responding.

“I think the public will be naturally suspicious of the timing, right before an election,” he said.

Legal Aid Ontario had been spending about $45 million a year on immigration and refugee services, with about 35 per cent of that coming from the federal government and the rest from the province. Downey said Ottawa was funding other provinces' programs at 70 or 80 per cent.

Ontario pulled all of its funding for the program this spring, leaving it with a shortfall.

A spokesman for federal Justice Minister David Lametti said the $25.7 million announced Monday was in addition to approximately $15.4 million in previously committed federal money for the program. The new investment meant the program was roughly fully funded, he said.

Trudeau said the funding is one-time money, but he will “engage in reflections” on how to ensure the program's long-term sustainability.

Refugee lawyers applauded the announcement.

“Refugees and immigrants in Ontario have been facing a crisis,” Maureen Silcoff, president of the Canadian Association of Refugee Lawyers said in a statement.

“No one who is facing torture in a repressive regime, no woman who ran away from severe domestic violence in a country without protections, no LGBTQ2S individual who fled to save her life, should be subject to high-stakes legal proceedings without legal counsel.”

The Ontario NDP called on the provincial government to fully restore all legal aid funding that it cut.

- with files from Paola Loriggio.