President Obama took a dig at the "drill, baby, drill" slogan employed by Republicans and popularized by former Alaska Gov. Sarah Palin during a speech Wednesday on energy.

The president made an offhand reference to the slogan as an example of the empty rhetoric politicians have used in the past when it comes to energy policy.

"But here’s the thing — we’ve been down this road before. Remember, it was just three years ago that gas prices topped $4 a gallon. Working folks haven’t forgotten that," Obama said in a speech at Georgetown University, according to prepared remarks. "It hit a lot of people pretty hard. But it was also the height of political season, so you had a lot of slogans and gimmicks and outraged politicians waving three-point-plans for two-dollar gas — when none of it would really do anything to solve the problem."

Then the president made a departure from his prepared remarks: "You remember, 'drill baby drill.' "

The slogan was coined by Michael Steele, who would go on to lead the Republican National Committee (RNC), at the party's 2008 convention. At that time, oil prices and, in turn, gasoline prices had skyrocketed. House Republicans stayed in Washington for a "shadow session" in Congress, demanding increased drilling and energy exploration on U.S. soil.

Palin popularized the slogan during a debate against then-Sen. Joe Biden (D-Del.) during the 2008 vice presidential debate.

"The chant is 'drill, baby, drill,' " she said. "And that's what we hear all across this country in our rallies because people are so hungry for those domestic sources of energy to be tapped into."

Obama's speech wasn't without other political barbs; he lashed out at Republicans in Congress who have accused him of having shut down oil exploration in the Gulf of Mexico following the BP oil spill last spring and summer.

"When it comes to drilling onshore, my administration approved more than two permits last year for every new well that the industry started to drill," he said. "So any claim that my administration is responsible for gas prices because we’ve 'shut down' oil production might make for a useful political sound bite — but it doesn’t track with reality."