The United States insists it wants a diplomatic solution to the row but has not ruled out military action.
Dick Cheney, the US vice president, said on Saturday that Washington and its allies must curb Iran's atomic ambitions: "It would be a serious mistake if a nation such as Iran became a nuclear power."
But Ahmadinejad was quoted by Iran's student news agency ISNA as saying: "Iran has obtained the technology to produce nuclear fuel and Iran's move is like a train ... which has no brake and no reverse gear".
"It is stubbornness and pride on Iran's part that has led to this impasse, and it can only lead to disaster for Iran"
Diom1982, Cork, Ireland
Send us your views
"We dismantled the rear gear and brakes of the train and threw them away sometime ago," Ahmadinejad was quoted as telling a gathering of Islamic clerics.
An Iranian deputy foreign minister echoed Ahmadinejad, saying the Islamic Republic, which is accused by the West of trying to build nuclear weapons, was ready for any possible scenario "even for war".
Manouchehr Mohammadi, one of the deputies to the foreign minister, was quoted by ISNA as saying at a conference in the central city of Isfahan:
"We have prepared ourselves for any situation, even for war."
Mohammadi said that if the UN Security Council adopted a second resolution imposing sanctions over Iran's controversial nuclear programme, Tehran would press on with its atomic drive.
"If they issue a second resolution, Iran will not respond and will continue its nuclear activities," he said.
The United States accuses Iran of seeking nuclear weapons. Tehran denies the charges, insisting its atomic programme is peaceful in nature.
Condoleezza Rice, the US Secretary of State, said that what Iran needed was not a reverse gear, but a stop button.
She also pledged direct talks with Iranian officials if Tehran halts its nuclear enrichment programme.
The diplomatic stand-off has also been described as "dangerous" by foreign ministers from seven Muslim states who are meeting in Pakistan.
"It is vital that all issues must be resolved through diplomacy and there must be no resort to use of force," said a statement agreed by the ministers representing Pakistan, Egypt, Jordan, Saudi Arabia, Turkey, Indonesia and Malaysia.
The five premanent members of the UN security council along with Germany, will meet in London on Monday to discuss further sanctions against Iran.