May 1 (Reuters) - After 12 years and C$34 billion ($24.7 billion), Canada's Trans Mountain pipeline expansion project (TMX) is set to start shipping oil on Wednesday, a major milestone expected to transform access to global markets for the country's producers.

Pipeline constraints have forced Canadian oil producers to sell oil at a discount for many years, but TMX will nearly triple the flow of crude from landlocked Alberta to Canada's Pacific coast to 890,000 barrels per day.

For Canada, the world's fourth-biggest oil producer, the additional pipeline capacity is set to boost crude prices, lift national gross domestic product and open up access to Asian oil markets.

"It's an exciting day. Everyone has been waiting for this for literally years," said Rory Johnston, founder of the Commodity Context newsletter. "It's a fantastic thing for Canada and the Alberta oil patch."

The expanded pipeline was first proposed by Kinder Morgan in 2012. It was bought by the Canadian government in 2018 to ensure the controversial project got built, but construction has been marred by regulatory delays and costs soaring to more than four times the project's original budget.

The Canada Energy Regulator (CER) granted the final permits for the expansion project on Tuesday, clearing the way for the pipeline to start operating.

Trans Mountain Corp has said May 1 marks the commercial commencement date for the project when oil will begin flowing, but does not expect the first tanker to load at Westridge Marine Terminal in the Port of Vancouver until the second half of May.

EXPORT OPTIONS

TMX will substantially boost Canada's oil export capacity and could help shrink the discount on benchmark Canadian heavy crude, currently around $13.50 a barrel below U.S. crude, to less than $10 a barrel, analysts at RBC Capital Markets said in a note to clients.

Asian buyers are already showing interest in Canadian crude.

Reliance Industries has bought 2 million barrels of Canadian crude from Shell for July delivery, marking the Indian refiner's first oil purchase from TMX, Reuters reported this week.

For Ottawa, the project's completion comes as a relief. Prime Minister Justin Trudeau's Liberal government was slammed by environmental campaigners for buying the pipeline in the first place, and has drawn sharp criticism during the construction process for spiralling costs.

Green groups worry about the pipeline's potential to cause spills in pristine areas and its expansion of carbon-intensive oil sands crude, while climate activists warn increasing oil and gas production risks hamstringing Canada's efforts to cut greenhouse gas emissions.

The federal government wants to sell at least part of Trans Mountain to Indigenous groups, but is expected to have to take a major haircut on its investment.

"The Trans Mountain Expansion Project will ensure Canada receives fair market value for our resources while maintaining the highest environmental standards," said Katherine Cuplinskas, press secretary to Deputy Prime Minister Chrystia Freeland.

"The federal government will launch a divestment process in due course."

Canadian oil production is forecast to hit a record high of around 5.3 million bpd this year, according to TD Securities, as producers ramp up output in anticipation on TMX's new capacity.

Two traders in Calgary said oil inventories in Alberta are brimming at record levels of 42 million barrels, but expected to draw down reasonably quickly once the expanded pipeline starts flowing.

"The completion of TMX is monumental for Alberta, since this will significantly increase our province's output," Alberta premier Danielle Smith said in a statement on Tuesday.

Conservative premier Smith is a frequent critic of Trudeau's Liberals but thanked the federal government for seeing the project through, and said stronger Canadian crude prices would result in many millions of dollars extra in government revenues.

"This is a game changer for Alberta," she said. ($1 = 1.3778 Canadian dollars) (Reporting by Nia Williams in British Columbia; Editing by Sonali Paul)