Updated

Republican presidential contender John McCain on Monday warned about U.S. reliance on foreign oil and the threat of global warming, dismissing even some in his own party who suggest climate change is a Hollywood-driven notion.

The way people in this country use oil "is a serious threat to our security, our economy and the well-being of our planet," the Arizona senator said in a speech to the Center for Strategic and International Studies.

"Al Qaeda must revel in the irony that America is effectively helping to fund both sides of the war they caused. As we sacrifice blood and treasure, some of our gas dollars flow to the fanatics who build the bombs, hatch the plots and carry out attacks on our soldiers and citizens," he said. "The transfer of American wealth to the Middle East helps sustain the conditions on which terrorists prey."

McCain's speech was one of three policy addresses before his formal presidential announcement on Wednesday in New Hampshire. The candidate has been seeking momentum for his second White House bid, buffeted by below-par fundraising totals, a drop in public opinion polls and widespread criticism of his hopeful assessment of progress in Iraq.

His tone Monday was doggedly serious. He read his nearly 25-minute speech from a teleprompter, lightening his delivery only slightly during the upbeat portions of the speech.

The senator pledged that as president, he would propose a national energy strategy that would "amount to a declaration of independence from the fear bred by our reliance on oil sheiks and our vulnerability to the troubled politics of the land they rule."

McCain also termed global warming "a serious and urgent economic, environmental and national security challenge" and added that "the problem isn't a Hollywood invention."

McCain favors climate-change legislation that would set caps on carbon and other greenhouse gas emissions and offer incentives for industries to come up with new energy sources.

"The world is already feeling the powerful effects of global warming, and far more dire consequences are predicted if we let the growing deluge of greenhouse gas emissions continue, and wreak havoc with Gods creation," he said.

Some Republicans have resisted legislation on climate change, fearing the impact on the energy industry. Others, such as Sen. James Inhofe, R-Okla., have suggested global warming is a hoax.

McCain singled out Iran and Venezuela as examples of nations that because of their oil wealth — and their ability to hold that over the United States' head — have no incentives to change their troublesome ways and open their economies and governments.

"The politics of oil impede the global progress of our values, and restrains governments from acting on the most basic impulses of human decency," McCain said.

Answering questions afterward, McCain pledged to turn around his lower-than-expected fundraising. He also repeated his defense of a joke he made on the campaign trail last week in which he answered a question about military action against Iran by briefly singing the chorus of the surf-rocker classic "Barbara Ann."

"That old, eh, that old Beach Boys song, Bomb Iran," he said. "Bomb, bomb, bomb, bomb, anyway, ah ..."

Critics have said the joke was reckless. McCain said Monday that anyone who would take it seriously should "lighten up and get a life."