Quebec City is getting the money it needs to build a tramway, putting an end to months of uncertainty around who would pay for it.

Prime Minister Justin Trudeau made it official Monday at a news conference in Quebec City, which was also attended by François Bonnardel, the provincial transport minister and Quebec City Mayor Régis Labeaume, among other politicians.

"Once completed, the tram will mean a faster commute, less time in traffic, cleaner air and more money in people's pockets as they trade their cars for public transit," Trudeau said.

The project is expected to cost $3.3 billion in total, with contributions coming from the federal, provincial and municipal governments.

However, Ottawa and Quebec had been arguing over which level of government should hand over the last $800 million needed to get the project off the ground.

That problem was solved in June, when Montreal Mayor Valérie Plante agreed to transfer $800 million of her city's share of federal infrastructure money over to Quebec City.

In exchange, the province committed to help build the western portion of Plante's proposed Pink line.

On Monday, Labeaume thanked Plante again for her role in getting the tramway funded.

The tramway was first announced in 2018, but there were questions about who would pony up the last $800 million needed to build it. (Submitted by city of Quebec)

"This day will remain, in our collective memory, the day Quebec City could finally move forward with the project that will literally transform our city," he said.

The money will also fund improvements to the current Métrobus lines, build 16 kilometres of dedicated bus lanes and four new park-and-ride lots.

Quebec City's 23-kilometre tramway will connect the Charlesbourg neighbourhood in the northeast to the Sainte-Foy neighbourhood in the west. It is expected to take 38 minutes to get from one end of the line to the other.

First announced in 2018, the tramway is scheduled to start running in 2026. The city hopes it will help take up to 12,500 cars off the road every day.