Iran said it "successfully" launched a satellite Sunday but failed to put it into orbit, in a blow to its space programme that the US alleges is a cover for missile development.
The attempted launch of the Zafar -- "Victory" in Farsi -- comes days before the 41st anniversary of the Islamic Revolution and crucial parliamentary elections in Iran.
Arch foes Iran and the United States have appeared to be on the brink of an all-out confrontation twice in the past seven months.
Long-standing acrimony between Tehran and Washington was exacerbated in 2018 when US President Donald Trump unilaterally withdrew from a deal that froze Iran's nuclear programme, before issuing new demands that Tehran curtail its development of ballistic missiles.
Washington has also raised concerns in the past about Tehran's satellite programme, saying the launch of a carrier rocket in January 2019 amounted to a violation of limits on its ballistic missiles.
Iran maintains it has no intention of acquiring nuclear weapons, and says its aerospace activities are peaceful and comply with a UN Security Council resolution.
On Sunday, it launched the Zafar satellite at 7:15 pm (1545 GMT) but it fell short of reaching orbit, the defence ministry said.
A ministry spokesman said initially that the satellite was "successfully" launched and went "90 per cent of the way", reaching an altitude of 540 kilometres (335 miles).
"The Simorgh (rocket) successfully propelled the Zafar satellite into space," said Ahmad Hosseini of the ministry's space unit.
"Unfortunately, in the final moments the carrier did not reach the required speed" to put it into orbit, he told state television.
"God willing with improvements made in future launches this part of the mission will be done as well," he added.
"We achieved most of the goals we had and data has been acquired, and in the near future, by analysing the data, we will take the next steps."
Telecommunications Minister Mohammad Javad Azari Jahromi admitted in an English-language tweet soon after that the launch had "failed".
"But We're UNSTOPPABLE! We have more Upcoming Great Iranian Satellites!" said Jahromi.
Tweeting in Farsi, he added: "I would have liked to make you happy with #good_news but sometimes life does not go the way we want it."
Iran on Sunday also unveiled a new a short-range ballistic missile and its "new generation" of engines designed to put satellites into space.
The Revolutionary Guards' website said the Raad-500 missile was equipped with new Zoheir engines made of composite materials that make them lighter than previous steel models.
It also unveiled Salman engines made of the same materials but with a "movable nozzle" for the delivery of satellites into space, allowing "manoeuvrability beyond the atmosphere".
In January 2019, Tehran announced that its Payam -- "Message" in Farsi -- satellite had failed to reach orbit, after authorities said they launched it to collect data on the environment in Iran.
The United States said the launch of the carrier rocket was a violation of a 2015 UN Security Council resolution endorsing the international accord on curbing Tehran's nuclear programme.
Resolution 2231 called on Iran to refrain from any activity related to ballistic missiles capable of delivering nuclear weapons.
Tehran confirmed in September that an explosion had taken place at one of its satellite launch pads due to a technical fault, and slammed Trump for "gleefully" tweeting about it at the time.
Trump said the US had nothing to do with what he called a "catastrophic accident" at Semnan Space Centre, also tweeting a high-resolution picture pointing to apparent damage at the site.
Sunday's developments come at a time of heightened tensions between Tehran and Washington, after a January 3 US drone strike killed top Iranian general Qasem Soleimani in Baghdad.
Iran retaliated days later by firing a wave of missiles at American troops stationed in Iraq.
Its defence forces had been braced for US retaliation when they accidentally shot down a Ukraine International Airlines flight a few minutes after take-off from Tehran on January 8.
Iran says its internet services have faced cyber attacks for the past two days, without elaborating on the source of the attack or the likely motives.
The country's on-off space programme unsettles some Western nations as the technology used in space-bound rockets can also be used in ballistic missiles.
The Islamic republic has successfully launched several satellites since February 2009.
It has also sent monkeys, a turtle, mouse and worms into space.