"You had an unprecedented show of unity on the part of the world community saying that Iran's actions raised grave doubts in terms of their presentation that their nuclear program was for peaceful purposes," Obama told reporters in Pittsburgh at a G-20 summit.
"So I think that Iran is on notice that when we meet with them on Oct. 1, they're going to have to come clean," Obama said, adding that Iran can choose to give up what the U.S. says is the desire for nuclear weapons and abide by international standards, or it can continue down a path toward confrontation.
The president would not rule out military options. But he added his preferred course of action is to resolve the standoff diplomatically.
"It's not a secret site," Ahmadinejad said at a news conference in New York. "If it was, why would we have informed the IAEA about it a year ahead of time. "They will regret this announcement."
Ahmadinejad said the new facility won't be operational for 18 months, so Iran did not violate any requirements of the International Atomic Energy Agency by not revealing its construction before this week.
The International Atomic Energy Agency, however, has rejected Iran's contention it must notify the agency of new facilities only six months before operations. The agency says Iran is obliged to make such a notification when it begins design of such facilities.
The Iranians said in March 2007 they were "suspending" the modification to their IAEA safeguards agreement requiring that early notification. But the IAEA countered that a government cannot unilaterally abandon such an agreement.
Obama earlier in the day demanded that Iran immediately allow international weapons monitors to inspect the nuclear facility the Islamic Republic now acknowledges it has been building for years.
Obama, joined by British Prime Minister Gordon Brown and French President Nicolas Sarkozy at the opening of the G-20 economic summit in Pittsburgh, warned Iran that it will be "held accountable" to an impatient world community if it does not fully disclose its nuclear ambitions.
"Iran has the right for peaceful power, but the size of the facility is inconsistent with a peaceful program," Obama said. "Iran is breaking rules that all nations must follow, endangering the world non-nuclear proliferation regime ... and the security of the world."
Obama's demand was echoed by Russian President Dmitry Medvedev, who called on Iran to "demonstrate readiness for full-scale cooperation" with inspectors.
Sarkozy said Iran has until December to comply or face sanctions. "This is for peace and stability," the French leader said. Brown accused Iran of "serial deception."
Secretary of State Hillary Clinton also called for an immediate probe of the site by the International Atomic Energy Agency.
Before the public condemnation, Ahmadinejad warned Obama to back off.
"If I were Obama's adviser, I would definitely advise him to refrain making this statement because it is definitely a mistake," Ahmadinejad told TIME magazine in an interview about an hour before Obama spoke.
Ahmadinejad told the magazine that Iran was not keeping anything from the International Atomic Energy Agency.
"We have no secrecy, we work within the framework of the IAEA," he said.
Iran revealed the existence of its covert uranium enrichment facility to the IAEA this week after it discovered the project's secrecy had been breached by Western intelligence agencies.
An official told FOX News that Iran revealed the existence of the second plant in a letter sent Monday to IAEA chief Mohamed ElBaradei.
Iran is under three sets of U.N. Security Council sanctions for refusing to freeze enrichment at what had been its single known enrichment plant, which is being monitored by the IAEA.
A senior administration official told FOX News that the U.S. has been tracking the secret project for years.
U.S. intelligence believes that the secret Iranian nuclear facility is in an underground tunnel complex on a military base controlled by the elite Revolutionary Guards.
The details were included in a document that Obama administration sent to U.S. lawmakers. Excerpts were provided to The Association Press by an official on condition of anonymity because the document, though unclassified, was confidential.
The document says the facility is "too small to be viable for the production of fuel for a nuclear power reactor, but may be well suited for a military purpose."
The location at the military base would also undermine Iran's claim that the program is for civilian purposes.
Iran's letter to the IAEA contained no details about the location of the second facility, when -- or if -- it had started operations, or the type and number of centrifuges it was running.
"They [Iran] have cheated three times, and they have now been caught three times," an unnamed official with access to the intelligence told The New York Times.
But one of the officials, who had access to a review of Western intelligence on the issue, said it was about 100 miles southwest of Tehran and was the site of 3,000 centrifuges that could be operational by next year.
Iranian officials had previously acknowledged having only one plant, which the IAEA has been monitoring, and had denied allegations of undeclared nuclear activities.
The last IAEA report on Iran in August said Iran had set up more than 8,000 centrifuges to churn out enriched uranium at the cavernous underground Natanz facility, although the report said that only about 4,600 of those were fully active.
The Islamic Republic insists that it has the right to generate fuel for what it says will be a nationwide chain of nuclear reactors. But because uranium enrichment can make both fuel and weapons-grade uranium, the international community fears Tehran will use the technology to generate the fissile material used on the tip of nuclear warheads.
The revelation of a secret plant further hinders the chances of progress in scheduled Oct. 1 talks between Iran and six world powers.
At that meeting -- the first in more than a year -- the five permanent U.N. Security Council members and Germany plan to press Iran to scale back on its enrichment activities. Tehran has declared that it will not bargain on enrichment.
While Iran's mainstay P-1 centrifuge is a decades-old model based on Chinese technology, it has begun experimenting with state-of-the art prototypes that enrich uranium more quickly and efficiently.
U.N. officials familiar with the IAEA's attempts to monitor and probe Iran's nuclear activities have previously told the AP that they suspected Iran might be running undeclared enrichment plants.
The existence of a secret Iranian enrichment program built on black-market technology was revealed seven years ago. Since then, the country has continued to expand the program with only a few interruptions as it works toward its aspirations of a 50,000-centrifuge enrichment facility at the southern city of Natanz.
The Associated Press contributed to this report