Updated

Defense Secretary Donald H. Rumsfeld urged the world Saturday to find a diplomatic solution to halt Iran's nuclear program, but Sen. John McCain said only hours later that military action could not be ruled out.

Rumsfeld told an international security conference that the United States stands "with the Iranian people, the women, the young people, who want a peaceful, democratic future," and he accused Tehran of sponsoring terrorism.

"The Iranian regime is today the world's leading state sponsor of terrorism," he said. "The world does not want, and must work together to avoid, a nuclear Iran."

Despite Rumsfeld's call for diplomacy, McCain said military action could not be ruled out if diplomatic efforts fail to stop Iran from developing a nuclear bomb.

"Every option must remain on the table," McCain told the security conference after Rumsfeld spoke. "There's only one thing worse than military action, that is a nuclear-armed Iran."

The Arizona Republican later added that military action is "totally undesirable" and could be considered only after all other options were exhausted.

Rumsfeld spoke just before the 35-nation board of the International Atomic Energy Agency voted in Vienna, Austria, to report Iran to the U.N. Security Council in a resolution expressing concern that Tehran's nuclear program may not be "exclusively for peaceful purposes."

Tehran responded by saying it would "immediately" prepare to restart full-scale uranium enrichment and curtail the U.N. nuclear watchdog's inspecting powers.

German Chancellor Angela Merkel urged China and Russia to join the United States, Germany and other European nations in pressuring Iran to return to negotiations.

"The broader this is, the more significant it will be for Iran," she said.

Merkel told the conference that Iran cannot be allowed to develop nuclear weapons, and she said Germany's Nazi past meant it could never tolerate derogatory comments about Israel and the Holocaust by Iranian President Mahmoud Ahmadinejad.

Iran Deputy Foreign Minister Abbas Araghchi said after Merkel's speech that "Iran has never been seeking nuclear weapons" but warned that Security Council referral was an "escalation" of the dispute and could affect regional stability.

"I hope that Europe doesn't choose this line of confrontation," he told the conference. "You know our role in Afghanistan and our role to stabilize Iraq, but threats against us are always ignored."

Rumsfeld also appealed to allies to increase military spending to defeat a "global extremist empire" that threatens Europe as much as the United States. He said Islamic militants are on the move and must be checked.

"They seek to take over governments from North Africa to Southeast Asia and to re-establish a caliphate they hope, one day, will include every continent," he said. "They have designed and distributed a map where national borders are erased and replaced by a global extremist empire."

Rumsfeld painted a stark picture of a lengthy war against terrorism, saying terrorists hope to use Iraq as the "central front" by turning it into a training and recruitment area like Afghanistan under the Taliban.

He warned that "a war has been declared on all of our nations" and said their "futures depend on determination and unity in the face of the terrorist threat."

Rumsfeld and Merkel spoke on the second day of the 42nd annual Munich security conference, a gathering that defense experts and policy-makers traditionally use for frank exchanges.

This year's conference is focused on the trans-Atlantic relationship between the United States and Europe.

Likening the war on terror to the Cold War, Rumsfeld said it could be won if nations persevered.

"Freedom prevailed because our free nations showed resolve when retreat would have been easier, showed courage when concession seemed simpler and more attractive," he said.

Still, he pointed out that the United States spends 3.7 percent of its gross domestic product on national defense while 19 of the 25 other NATO nations spend less than 2 percent.

Germany, which spends 1.4 percent of its GDP on defense, has been under pressure to step up its funding.

"It's always easier for all of us to use our scarce tax dollars to meet some of the desires and appetites we have at home," Rumsfeld said. "But unless we invest in our defense and security, our homelands will be at risk."

Merkel said Germany was willing to be more active on the international stage but warned that budget restraints would continue to limit her country's defense spending.

French Defense Minister Michele Alliot-Marie backed Rumsfeld's call for more defense spending, calling it "indispensable."

"Everyone has to be aware that they have to take their responsibility," she said.