Warren Buffett just injected himself into one of the hottest environmental debates in the country.

On Thursday Buffett's Berkshire Hathaway (BRKA) announced through a regulatory filing with the Securities and Exchange Commission that it bought $524 million worth of Suncor stock last quarter.

Suncor (SU) is a Canadian oil company that derives most of its current oil production -- and future expansion plans -- from Alberta's oil sands.

Preventing oil sands expansion is the main reason why environmentalists are urging President Obama to reject the Keystone XL pipeline, the controversial $5.3 billion project slated to carry oil from Alberta to the Gulf Coast.

Oil from the oil sands region is thought to emit 17% more greenhouse gases than traditional crude, primarily due to the energy it takes to separate the oil from the sand.

Oil sand proponents say the oil will still make it to market whether Keystone is built or not, via other pipelines to Canada's coasts or by rail. That's an argument the Obama administration has bought up until now.

But there's an intense campaign underway by environmentalists to get the administration to change its mind.

Buffett is now a major player in this debate, and his investment in oil in general drew criticism Thursday.

"Investing in oil is investing in the past and it's investing in climate change," said Daniel Kessler, a spokesman for the environmental group 350.org. "It's not ethical to try to profit off of the same companies that are destroying the climate."

Berkshire did not immediately respond to an email seeking comment.

Related: If Wall Street's right, Obama may nix Keystone

Politics aside, it's possible Buffett bought Suncor to help ensure a steady supply of oil for his BNSF railroad to move. Oil currently accounts for about 4% of BNSF's freight, the company's president was quoted saying Wednesday by the Houston Chronicle's FuelFix blog. That's expected to double over the next several years.

But analysts say it's more likely Buffett bought Suncor because it's a good old-fashioned value.

The company is well run and owns huge tracts of oil sands resources from which oil production -- despite the objections of environmentalists -- is projected to continue to grow.

Oil sands producers have been in a bit of a bind of late, as trouble moving the oil out of Alberta has caused a buildup of it in the middle of the continent, depressing both oil prices and the stock prices of companies in the space, including Suncor.

But Suncor doesn't have the same transportation issues as some other oil sands producers, said David McColl, an oil analyst at Morningstar. It's locked up more than enough pipeline and rail capacity to move its current and planed production for several years.

Plus, it owns several refineries, which help the firm avoid having to sell its crude for the depressed, mid-continent prices.

McColl expects the stock to go from its current $32 a share to $52 a share in five years.

"This is a value play," said McColl. "The stock is significantly discounted, and now is a great time to buy it."