US Attorney General Eric Holder says the alleged conspiracy was "conceived, sponsored and directed from Iran"
The US says it has broken up a major terror plot in which agents linked to Iran sought to assassinate the Saudi ambassador to Washington.
Two men originally from Iran - one a naturalised US citizen - have been charged with counts of conspiracy, Attorney General Eric Holder said.
The plot was "conceived" in Iran by the Quds force, part of Iran's Revolutionary Guard Corps, he added.
The state department has listed Iran as a "state sponsor" of terror since 1984.
Mr Holder described the $1.5m (£960,000) assassination plot as being "conceived, sponsored and directed by Iran", and said Tehran would be held accountable for its alleged involvement.
Top Iranian officials were responsible for the plans, Mr Holder said.
Iran's official Islamic Republic News Agency called the charges a "propaganda campaign" by the US government against Tehran.
Iranian foreign ministry spokesman Ramin Mehmanparast told the semi-official Iranian news agency, Fars, that the allegations were "a comedy show fabricated by America".
The two men linked to the alleged plot were named as Manssor Arbabsiar, a 56-year-old naturalised US citizen with dual Iranian and US passports, and Gholam Shakuri, based in Iran and said to be a member of Iran's Quds Force.
Mr Arbabsiar, who was arrested in John F Kennedy airport in New York on 29 September, has confessed to his involvement in the alleged plot, Mr Holder said. Mr Shakuri was said to be in Iran.
On 24 May 2011 Mr Arbabsiar made contact with an informant for the US Drug Enforcement Agency, under the impression that he was an operative of a Mexican drugs cartel.
Over a series of meetings, details emerged of a conspiracy that involved members of the Iranian government to pay $1.5m for the assassination of Saudi Ambassador Adel al-Jubeir on US soil.
The plot would have been carried out with the use of explosives, Mr Holder said. But he added that no explosives were ever put in place and the public was not in danger.
Mr Holder said the plans led Mr Arbabsiar, with approval from Mr Shakuri, to wire $100,000 to a US bank account for the informant as a downpayment for the assassination.
Mr Arbabsiar and Mr Shakuri have been charged with conspiracy to murder a foreign official, weapons conspiracy, and conspiracy to commit international terrorism charges.
President Barack Obama is said to have been informed of the alleged plot in June 2011 and was kept up to date with developments.
The disruption of the alleged plot is the result of significant co-operation with Mexican authorities
White House spokesman Tommy Vietor said the president had "directed his administration to provide all necessary support to this investigation".
"The disruption of this plot is a significant achievement by our intelligence and law enforcement agencies, and the president is enormously grateful for their exceptional work," Mr Vietor added.
Mr Holder said the alleged conspiracy amounted to a "flagrant violation of US and international law" and breaches international conventions that protect diplomats from harm.
Secretary of State Hillary Clinton told a news conference the US would consult with its international partners to send a "very strong message" that such alleged action must stop.
FBI Director Robert Mueller told reporters: "Though it reads like the pages of a Hollywood script, the impact would have been very real and many lives would have been lost."
The treasury department later announced sanctions against five people - including Mr Arbabsiar and Mr Shakuri - whom it linked to the alleged plot.
Mr Arbabsiar appeared briefly at a New York City court on Tuesday. He did not enter a plea and was held without bail.
He could face a life prison sentence if convicted on all charges, the Department of Justice said.
Criminal charges were brought in the southern district of New York because the alleged $100,000 downpayment was wired through a bank in the area, officials said earlier.
BBC News - Iran agents 'planned US terror attacks'