Toronto Mayor John Tory praised Justin Trudeau's Liberal government for "listening to our issues" and investing in the city's transit and social housing in the federal budget.

Earlier Tuesday, Finance Minister Bill Morneau tabled his first federal budget in the House of Commons.

"I'm thrilled to see that federal funding to transit systems will be allocated on the basis of ridership numbers, a change that has long been advocated by myself and by my fellow big-city mayors across the country," Tory said at a news conference.

Investing $3.4 billion in public transit systems across the country over the next three years will "make a major impact on the TTC's state of good repair work, which will mean better services for our residents and a stronger, more reliable system across the city," Tory said.

The Liberal government said funds will be directed to fleet replacement, including the purchase of new subway cars, low-floor buses, and streetcars, but did not specify how much Toronto will receive.

TTC Chair Josh Colle said the federal government's commitment to maintaining "the nuts and bolts" of the TTC is something he's long been calling for.

"Maintaining our most integral infrastructure, addressing our growing backlog of repairs, modernization of the technology in the tunnels, and consistent funding have always been my top transit priorities," Colle said.

"Our system experiences too many service delays due to aging infrastructure and today's announcement is a substantial step in reversing this trend," he added.

The budget also includes a $2.3 billion investment in affordable housing, a move Tory commended. But it didn't say how much of that money would be directed to Toronto.

Tory said "this marks the first time in many years where a federal budget takes steps to address the profound needs of Toronto's citizens who live in social housing.

"Investment in the repair and the revitalization of Toronto Community Housing (TCH) will immediately improve people's lives," he said. "It's much needed and it's overdue."

Julie Langer, CEO of the Toronto Atmospheric Fund (TAF), which focuses on reducing greenhouse gas emissions in the city, also welcomed news that the government will spend $5 billion over the next five years on greening Canada's infrastructure and another $1.75 billion over the next two years toward developing a clean economy and protecting the environment.

Langer said TAF has worked with TCH on "energy efficiency projects that will save them money, make them more comfortable for residents, and renew the infrastructure because they're quite degraded.

"The government has understood that climate change is here and now, that it's going to affect cities," she told CBC News.   

Tory said it's encouraging to have a federal partner who understands the need to invest in Canada's people, and said he will "encourage our provincial partners to mirror this enthusiasm for big cities and the return on investment they provide."