TORONTO -- Ottawa and Ontario say they will spend $3.4 billion to build a light-rail transit line in Hamilton.

The federal and provincial governments announced they will each contribute $1.7 billion to the 14-kilometre line to advance the "shovel-ready" project.

They say the project will create thousands of jobs and improve public transit in the city.

The 17-stop line will run from Hamilton's Eastgate Square through the city's downtown core to McMaster University.

The funding is part of a broader $12-billion federal transit spending package announced earlier this week that includes more than $10 billion for four projects in the Greater Toronto Area.

Those projects were first announced in April 2019, when Premier Doug Ford unveiled a $28.5-billion transit plan for the GTA.

Federal Infrastructure Minister Catherine McKenna said the funding is part of federal commitment to build transit projects across Canada now.

"This investment in the only shovel-ready major transit project in Hamilton, will help kick-start the economy and create good jobs," she said.

Ontario Transportation Minister Caroline Mulroney said the funding agreement will see the province increase its financial commitment to the project.

The Hamilton LRT project has been the subject of controversy for years after it was cancelled by the Progressive Conservatives in December 2019.

That sparked outrage in the city, with local officials calling it a betrayal that would hurt both the municipal and provincial economy.

The project was initially estimated to cost $1 billion when the province's previous Liberal government committed to funding it in 2014.

The Progressive Conservatives promised during the 2018 election to move ahead with it, then re-committed to it in their 2019 budget last March before cancelling it later that year citing billions in cost escalation.

In her annual report, Ontario's auditor general deemed the $5.5-billion project estimate provided by the Tories as "reasonable" and said the Ministry of Transportation knew as early as 2016 that the costs of the project were greater than $1 billion, but did not make the fact public.

Earlier this year, Ontario said it needed the federal government to commit $1.5 billion in order to build the light-rail transit line in Hamilton.

Last year, a provincially appointed panel issued a report saying the city needs a "higher order" transit project to address future growth -- either a light-rail line or a bus rapid transit line.

This report by The Canadian Press was first published May 13, 2021.