President Barack Obama declared that Iran is on a path to confrontation with world powers unless it agrees to "come clean" and disclose all its nuclear activities.
He said he would not rule out military action.
Mr Obama joined the leaders of Britain and France in accusing the Islamic republic of clandestinely building an underground plant to make nuclear fuel that could be used to build an atomic bomb.
Iranian officials acknowledged the facility but insisted it had been reported to nuclear authorities as required. "Iran's action raised grave doubts" about its promise to use nuclear technology for peaceful purposes only, Mr Obama told a news conference at the conclusion of a G20 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 US and other world powers to discuss the nuclear issue. "Iran is on notice that when we meet with them on October 1 they are going to have to come clean and they are going to have to make a choice," he said, between international isolation and giving up any aspirations to becoming a nuclear power. 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, Mr 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 Mr Obama would regret his accusations. At a news conference in New York, Mr Ahmadinejad said the plant would not be operational for 18 months but sidestepped a question about whether Iran had sufficient enriched uranium to manufacture a nuclear weapon. Still, he said Tehran rejects such armaments as "inhumane."
The head of Iran's nuclear program suggested UN 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.