Ottawa and Quebec shared a rare moment of solidarity Thursday, agreeing to split the estimated $190 million price tag to decontaminate the devastated town of Lac-Megantic.

Last summer, a runaway tanker train carrying crude oil rumbled into the heart of the Quebec community, jumped the tracks and exploded in a fiery crash that killed 47 people.

The derailment levelled the town's centre and spewed millions of litres of crude into the environment, contaminating the soil as well as a nearby river and lake.

Prime Minister Stephen Harper visited the region Thursday and pledged to help cover up to $95 million of the cleanup cost, one-half of the overall estimate made by the Quebec government.

"I know there is no amount of money that can erase the painful memories...but you have to know that our government is doing everything in its power to support you," Harper told a news conference at the Lac-Megantic golf course, a few kilometres from the centre of town.

"The events of July 6, 2013, profoundly touched all Canadians from one end of the country to the other.

"Above all, they noticed your resilience, your determination and your pure desire to rebuild."

The provincial intergovernmental affairs minister reacted positively to Harper's commitment, even though members of the sovereigntist Parti Quebecois government were not present for the announcement.

"We're happy that at the end of the day we'll share the bill with the federal government," Alexandre Cloutier said in Quebec City, adding he believes Harper will be true to his word.

"I'm convinced he said the truth at the press conference."

The announcement follows Ottawa's earlier commitment to spend $60 million on emergency response and to relaunch the local economy.

Harper's visit to Lac-Megantic, about a three-hour drive east of Montreal, was his third since the disaster.

He was welcomed by Mayor Colette Roy-Laroche, who said the latest federal investment comes at an important time.

"With winter and the holiday period around the corner, we really needed some good news," said Roy-Laroche, who was widely praised for her poise and calm demeanour in the aftermath of the disaster.

"Today, your visit shows us that we have allies in the federal government and we are very happy."

Roy-Laroche said the decontamination process will begin soon after a call for tenders and she predicted it to last at least 18 months. About 40 per cent of the decontaminated soil has been excavated, she added.

The Quebec community, meanwhile, is gradually rebuilding. Dumptrucks, backhoes and construction workers were busy Thursday in the town's downtown core, which is surrounded by towering mounds of earth.

A section of Lac-Megantic's railroad tracks, which provide a critical economic lifeline for local businesses, is expected to reopen in the coming weeks.

Roy-Laroche said she expects the federal government to participate and contribute more money as the reconstruction process moves forward.

"We are thinking about the future," she said.

In his announcement, Harper said his government has taken concrete steps to improve rail safety since the disaster.

He noted that Ottawa has called for a parliamentary study on the transport of dangerous materials.

Harper also pointed to a new federal rule introduced this week to force rail companies to tell municipalities when they transport dangerous goods across their borders.

The company at the centre of the disaster, Montreal, Maine & Atlantic, remains under investigation, he added.

"We want to absolutely assure you that we will get to the bottom of this," Harper said.