WASHINGTON — In his first negative ad of the general election campaign, Democrat Barack Obama said John McCain is "part of the problem" of high gas prices and tried to parry Republican criticism of his own energy policy.

The 30-second commercial is a direct response to a Republican Party ad launched this weekend. The GOP spot — airing at a cost of $3 million in four states — accuses Obama of offering no new solutions to solve high gas prices and global warming. Obama's ad will run in the same states where the Republican National Committee placed its ad — Michigan, Ohio, Pennsylvania and Wisconsin, his campaign said.

Obama's sharp retort comes as worried voters have made the spiking cost of fuel one of the top issues in the presidential campaign. The ad fight also flared amid evidence that Americans appear to be more receptive to some of McCain's proposed solutions, including increased oil drilling in the United States.

"On gas prices, John McCain's part of the problem," the Obama ad states. "McCain and Bush support a drilling plan that won't produce a drop of oil for seven years. McCain will give more tax breaks to big oil. He's voted with Bush 95 percent of the time.

"Barack Obama will make energy independence an urgent priority. Raise mileage standards. Fast-track technology for alternative fuels. A $1,000 tax cut to help families as we break the grip of foreign oil. A real plan and new energy."

McCain and Bush want Congress to lift the ban on drilling on the continental shelf. If Congress agrees and states then permit it, energy experts say it would take at least five to seven years before new drilling could begin.

Obama's claim that McCain would give more tax breaks to oil companies is based on McCain's proposal to cut overall corporate tax rates. The campaign cited a study by the Democratic-leaning Center for American Progress Action Fund that concluded McCain's proposal to cut corporate tax rates from 35 percent to 25 percent would cut taxes on the top five U.S. oil companies by $3.8 billion a year.

McCain, however, did vote against a 2005 energy bill backed by President Bush, saying at the time that it included billions of dollars in unnecessary tax breaks for the oil industry. Obama voted for the legislation. While Obama's ad correctly states that McCain voted with Bush 95 percent of the time in 2007, his support for Bush's position on legislation in 2005 was a low of 77 percent.

"Barack Obama today launched the first attack ad from either campaign in this election, which follows a string of calculating position changes proving that Barack Obama's commitment to a new type of politics is officially over," said McCain spokesman Tucker Bounds. "Even worse, Barack Obama actually voted for the Bush-Cheney energy bill and its big-oil tax breaks that he is attacking, so let's end the pretense that Obama is anything other than a typical politician."

The Obama campaign disputed Bounds' claim that the commercial is the first negative ad from either campaign. It cited a Spanish-language McCain radio ad last week that stated that "the other candidate has just discovered the importance of the Hispanic vote." Another McCain ad on the Web site of the Jerusalem Post shows pictures of Obama and Iranian President Mahmoud Ahmadinejad and poses the question: "Is it OK to unconditionally meet with anti-American foreign leaders?"

Over the past several weeks, as fuel prices continued to rise, both candidates have staked out ever more specific positions on energy.

A poll released last week by the Pew Research Center showed that nearly one of every two Americans now rate energy exploration, drilling and building new power plants as the top priority — all of them stands embraced by McCain. Only 35 percent gave those steps top priority five months ago.

At the same time, a USA Today-Gallup Poll released last month showed that nine in 10 people said energy, including gas prices, would be very or extremely important in deciding their presidential vote in November. People surveyed also said Obama would do a better job than McCain on energy issues by 19 percentage points.

The rising support for drilling, however, has put Democrats on the defensive. The Senate Democratic leadership on Tuesday issued a statement responding to Republican demands to lift the moratorium on offshore exploration. Democrats pointed to Interior Department statistics that show that 32.5 million acres of outer continental shelf lands are under lease but not producing oil.

"Despite Republican spin to the contrary, Democrats have supported efforts to expand domestic production of oil and gas," the statement issued by the Senate Democratic Conference Committee said. "Democrats want oil and gas companies to drill for oil on the leases we have given them — both onshore and offshore — and we believe any oil found needs to stay in the U.S."