"Iran's action raised grave doubts" about its promise to use nuclear technology for peaceful purposes only, Obama told a news conference at the conclusion of a G-20 summit whose focus on world economic recovery was overshadowed by disclosure of the Iranian plant.
Obama said a telling moment could come next week when Iran meets with U.S. and other major nations to discuss the nuclear issue.
"Iran is on notice that when we meet with them on Oct. 1 they are going to have to come clean and they are going to have to make a choice" between international isolation and giving up any aspirations to becoming a nuclear power, he said. If they refuse to give ground, they will stay on "a path that is going to lead to confrontation."
In his earlier announcement about the secret Iranian facility, Obama said "Iran is breaking rules that all nations must follow. The size and configuration of this facility is inconsistent with a peaceful program."
Unbowed, Iranian President Mahmoud Ahmadinejad said his country had done nothing wrong and Obama would regret his accusations.
At a news conference in New York, Ahmadinejad said the plant wouldn't be operational for 18 months but sidestepped a question about whether Iran had sufficient enriched uranium to manufacture a nuclear weapon. Still, he said such armaments "are against humanity, they are inhumane," and he said anyone who pursues them "is retarded politically."
The head of Iran's nuclear program suggested U.N. inspectors would be allowed to visit the site. Ali Akbar Salehi called the facility "a semi-industrial plant for enriching nuclear fuel" that is not yet complete, but he gave no other details, according to the state news agency IRNA.
The plant, near the holy city of Qom southwest of Tehran, would be about the right size to enrich enough uranium to produce one or two bombs a year, but inspectors must get inside to know what is actually going on, one U.S. official said.
At his Pittsburgh news conference, Obama appeared to hold out limited hope for the Oct. 1 meeting, which will be the first of its kind in more than a year. Iran has said its nuclear program should not be on the agenda.
"When we find that diplomacy does not work, we will be in a much stronger position to, for example, apply sanctions that have bite," Obama said. "That's not the preferred course of action. I would love nothing more than to see Iran choose the responsible path."
He said he was confident in the reliability of the intelligence information about Iran's secret nuclear facilities.
"This was the work product of three intelligence agencies, not just one," Obama said. "They checked over this work in a painstaking fashion."
Beyond tougher economic sanctions, options for acting against Iran are limited and perilous.
Military action by the United States or an ally such as Israel could set off a dangerous chain of events in the Islamic world. In addition, Iran's facilities are spread around the country and well hidden, making an effective military response difficult.
Asked about the prospect of using military force to stop Iran from getting the bomb, Obama said, "With respect to the military, I've always said that we do not rule out any options when it comes to U.S. security interests, but I will also re-emphasize that my preferred course of action is to resolve this in a diplomatic fashion. It's up to the Iranians to respond."
Defense Secretary Robert Gates, speaking Friday on CNN's "State of the Union," said it would be a mistake to rule out military action, but he also said there was still room to pursue diplomacy.
"The reality is, there is no military option that does anything more than buy time," Gates said, adding that the U.S. believes Iran could have a nuclear weapons within one to three years. "And the only way you end up not having a nuclear-capable Iran is for the Iranian government to decide that their security is diminished by having those weapons, as opposed to strengthened."
Obama said he was especially pleased that Russia and China agreed with him that Iran must live up to its obligations under international rules on nuclear activities. The leaders of Britain and France joined Obama at his morning announcement.
"We will not let this matter rest," said British Prime Minister Gordon Brown, who accused Iran of "serial deception."
French President Nicolas Sarkozy said Iran has until December to comply with demands for a fuller accounting of its program or face new sanctions.
On Capitol Hill, three senators - Democrat Evan Bayh of Indiana, Republican Jon Kyl of Arizona and Independent Joe Lieberman of Connecticut - issued a joint statement condemning Iran.
"Given Iran's consistent pattern of deceit, concealment and bad faith, the only way to force Iran to abandon its nuclear ambitions is to make absolutely clear to the regime in Tehran that its current course will carry catastrophic consequences," the senators said. "We must leave no doubt that we are prepared to do whatever it takes to stop Iran's nuclear breakout."
Iran had previously acknowledged having only the one uranium enrichment plant, under international monitoring, and had denied allegations of undeclared nuclear activities.
Patrick Clawson, an Iran expert at the Washington Institute for Near East Policy, said he doubts Iran will now feel compelled to be more open.
"The lesson they are likely to take from this is: `We have to try even harder at hiding these things,"' Clawson said in a telephone interview.
James Acton, a nuclear expert at the Carnegie Endowment for International Peace, said a consensus has developed that if Iran were to decide to manufacture nuclear weapons the key material probably would be produced in a clandestine facility.
"This should persuade any doubters that Iran's program is not for peaceful purposes," Acton said.
National Security Writer Robert Burns reported from Washington. Also contributing were Associated Press writers George Jahn in Vienna, Ben Feller, Foster Klug, Lynn Berry and Michael Fischer in Pittsburgh, Nasser Karimi in Tehran, Ben Judah in Moscow, John Heilprin in New York and Pamela Hess and Desmond Butler in Washington.