With rising oil prices creating a drag on the economy and his re-election effort, President Barack Obama mocked Republican critics of his alternative-energy policy Thursday, comparing them to the "cynics and naysayers" who didn't believe the Earth was round or that television would take off.

Obama used a campaign-style appearance at Prince George's Community College to launch a new, more aggressive line of attack against the GOP presidential contenders who have blamed him for rising prices at the pump.

He defended what he called his "all-of-the-above" strategy on energy, telling the boisterous crowd of students and supporters who packed Novak Field House that U.S. oil production has reached an eight-year high during his administration. But he said oil alone won't meet the nation's energy needs.

"Lately, we've heard a lot of professional politicians, a lot of the folks who are running for a certain office — who shall go unnamed — they've been talking down new sources of energy," Obama said.

"They dismiss wind power. They dismiss solar power. They make jokes about biofuels."

Obama compared his critics to 19th-century President Rutherford B. Hayes, who he said dismissed the telephone: "It's a great invention, but who would ever want to use one?"

"That's why he's not on Mount Rushmore," Obama said, in one of several lines that drew roars.

The president has focused in recent weeks on energy as he tries to get out in front of his Republican rivals on a possible area of vulnerability come November.

While falling unemployment and soaring stocks appear to have helped Obama in the polls, climbing prices at the pump could threaten his bid for a second term. The cost of a gallon of regular unleaded gasoline has risen more than 50 cents since December to $3.82 on Thursday, according to AAA.

Republican presidential front-runner Mitt Romney blamed Obama again Thursday for the increase.

In an interview with Fox News, Romney criticized Obama for restrictions on drilling in the Arctic National Wildlife Refuge and the Gulf of Mexico, and for his refusal to fast-track the Keystone XL pipeline project, which would carry oil from the tar sands of northern Canada to American refineries on the Gulf Coast.

"We're going to have to continue spending hundreds of billions of dollars out of our economy going into other nations," he told Fox. "His policies are responsible for not having America using the energy that we have in this country."

Economists say there is little a U.S. president can do to affect oil prices, which are subject to global market forces. They attribute the current climb to rising demand in China, India and the United States — where the appetite for energy has increased with the economic recovery — and to conflict with Iran, a major oil producer.

Nonetheless, 65 percent of voters surveyed last week disapproved of Obama's handling of gas prices, according to a Washington Post-ABC News poll released on Monday. Fifty-nine percent disapproved of his handling of the economy overall.

Obama acknowledged Thursday that gas prices "are putting a lot of pressure on families" — but he said more drilling alone would not bring them back down.

He said his administration has opened million of acres of land to drilling and has approved dozens of new pipelines to move oil across the country. He said the number of operating oil rigs has quadrupled to a record high.

"So do not tell me that we're not drilling," he said. "We're drilling all over this country. I guess there are a few spots where we're not drilling. We're not drilling in the National Mall. We're not drilling at your house. I guess we could try to have, like, 200 oil rigs in the middle of the Chesapeake Bay."

The problem, he said, is that the United States has only 2 percent of the world's known oil reserves but consumes 20 percent of the world's energy.

Critics say the 2 percent figure underestimates the country's potential deposits. But even if the United States has 3 percent of the world's oil, Obama said, "you don't need to be getting an excellent education at Prince George's Community College to know that we've got a math problem here."