Former President Barack Obama on Tuesday took credit for booming U.S. oil and gas production, telling investors to "say thank you" to him.

Obama spoke in Houston at an event hosted by Rice University’s Baker Institute, where he praised his administration's commitment to the Paris climate agreement before taking credit for the United States being the biggest producer of oil and gas during his administration.

Obama: "Suddenly America is the largest oil producer, that was me people … say thank you." pic.twitter.com/VfQfX1SR0x — Tom Elliott (@tomselliott) November 28, 2018

"I was extraordinarily proud of the Paris accords because — you know, I know we’re in oil country and we need American energy, and by the way, American energy production," Obama said.

"You wouldn't always know it, but it went up every year I was president. That whole, suddenly America’s like the biggest oil producer and the biggest gas — that was me, people."

He then went after Wall Street for saying he was anti-business, saying he asked them whether they had checked the state of their stocks when he entered office compared to when he left office.

"What are you talking about? What are you complaining about? Just say, ‘Thank you,' please," Obama said.

Obama has not been viewed as a friend of the oil and gas industry, but during his administration U.S. oil production did rise in each of his first seven years in office, according to Forbes. While natural gas production increased by 50 percent between 2009 and 2016, the production boom took place almost solely on state and private lands, where the Obama administration had very little control.

While Obama signed legislation in November 2015 ending a long-term ban on crude oil exports, he would go on to impose environmental regulations and would later pursue international agreements like the 2016 Paris Agreement to fight global warming.