WATCH: “Obviously for many years I used to think OPEC was very unfair,” Trump told reporters.

Before he became America’s president, Donald Trump wasn’t a huge fan of OPEC.

In fact, he devoted a section of his 2011 book “Time to Get Tough” to assailing the cartel for unfairly fixing oil prices, and he supported legislation that would have stripped OPEC members of the sovereign immunity that’s long shielded them from lawsuits.

Read More: Global Oil Deal in Sight After Russia Signals Readiness to Cut

However, an unprecedented crude market collapse -- and the shale boom that has rapidly transformed the U.S. into the world’s largest oil producer -- has prompted a change of heart. Instead of attacking the group and calling on it to lower oil prices, Trump is pressing OPEC (as well as Russia) to stop flooding the market with supplies and help him raise prices.

“Obviously for many years I used to think OPEC was very unfair,” Trump told reporters in Washington on the eve of an emergency meeting among OPEC members. “I hated OPEC. You want to know the truth? I hated it. Because it was a fix. But somewhere along the line that broke down and went the opposite way.”

Read More: Trump Forced by Oil War Into Unthinkable Push for Higher Prices

Trump made no secret of the reason for his about-face. “We have a tremendously powerful energy industry in this country now -- No. 1 in the world -- and I don’t want those jobs being lost,” he said Wednesday.