Iran fired a barrage of missiles at a major US military base in Qatar on Monday but President Donald Trump said Tehran had warned Washington before the attack and he announced that Israel and Iran had agreed to a ceasefire that could end the war.
The attack on Al Udeid Airbase, which came in retaliation for the US bombing of Iranian nuclear sites at the weekend, led to the closures of the airspace above Qatar, Bahrain and Iraq, forcing some flights to be diverted.
A Qatari military official said two waves comprising 19 missiles were launched at the base. All but one were shot down and there were no injuries.
"When we talk about today’s operation, it was truly the first time our air defences were subjected to an attack of this kind," the official said. "Thanks to God and the available capabilities, the armed forces were able to bring down 18 out of 19 missiles — only one missile fell."
US Central Command said it had "successfully defended against the attack."
Mr Trump said 14 missiles had been fired and that "hardly any damage was done", describing the attack as "weak".
Still, he indicated a willingness to soothe tensions with Tehran and thanked it for warning the US about the incoming missile salvo.
"Most importantly, they’ve gotten it all out of their 'system,' and there will, hopefully, be no further hate," the US President wrote on Truth Social.

"I want to thank Iran for giving us early notice, which made it possible for no lives to be lost, and nobody to be injured. Perhaps Iran can now proceed to peace and harmony in the region, and I will enthusiastically encourage Israel to do the same."
He subsequently posted Iran and Israel had agreed to a 12-hour ceasefire.
The ceasefire is expected to be enacted at about 12am Washington time, “at which point the war will be considered ended”, Mr Trump said on his Truth Social platform.
“Officially, Iran will start the ceasefire and, upon the 12th hour, Israel will start the ceasefire and, upon the 24th hour, an official end to the 12-day war will be saluted by the world,” he said.
Arab countries united in support of Qatar after the attack. Warning sirens sounded in Bahrain, where people were told to seek shelter in the nearest building.
Iran's Supreme National Security Council confirmed the attack on the Qatari base. It said the strike "does not pose any threat or danger to the brotherly and friendly state of Qatar or its honourable people".
Missiles were fired at the base “in response to the blatant and brazen act of aggression committed by the United States against Iranian nuclear sites and facilities", it said.
Al Udeid, about 30km south-west of Doha, hosts more than 10,000 US military personnel, making it the largest American military installation in the Middle East.
A US defence official told The National that the base was attacked by short and medium-range ballistic missiles from Iran.
Iran's attempt to attack the US's Al Udeid base - in pictures


Gulf condemnation
The UAE and Saudi Arabia were among Gulf countries to condemn the attack on Qatar. In a statement, the Ministry of Foreign Affairs expressed the UAE's full solidarity with Qatar and its support for all measures aimed at protecting the security and safety of its citizens and residents.
The ministry stressed the need for an immediate halt to military action, warning that further escalation would undermine regional security and lead to "disastrous repercussions" for international peace and security. It called for diplomatic solutions and serious dialogue to overcome the current crises in the region.
Saudi Arabia's Ministry of Foreign Affairs said it “strongly condemns and denounces, in the strongest terms, the aggression launched by Iran against the brotherly state of Qatar”. It added that it considers it “a blatant violation of international law and the principles of good neighbourliness – an act that is unacceptable and cannot be justified under any circumstances”.
The Secretary General of the Gulf Co-operation Council, Jasem Al Budaiwi, strongly condemned Iran’s missile attack on Qatari territory, calling it "a blatant violation of Qatar’s sovereignty" and a "direct threat to the security" of all GCC member states.
Mr Al Budaiwi reaffirmed that the security of the Gulf states is "indivisible" and that the council "stands firmly with Qatar against any threat to its territory".
Qatar's Foreign Ministry said the attack was a "blatant violation of Qatar’s sovereignty, airspace, international law and the UN Charter". It said Qatar "affirms its right to respond directly in a manner proportional to the nature and scale of this blatant aggression".
"We reaffirm that dialogue is the only way to overcome the current crises and ensure the security of the region and the peace of its people," it said.
Bahrain, which hosts the US Navy's Fifth Fleet, said people should remain calm and head to the nearest safe place. Motorists were urged to make way for emergency vehicles.
US forces in Kuwait restricted access to key military sites – Camp Arifjan, Camp Buehring, Ali Al Salem Air Base and Camp Patriot – to essential personnel only.
Etihad Airways said it anticipates flight disruption for the "coming days" due to airspace closures around the region. British Airways said flights to and from Dubai continue to operate.

Air war
The attack on Qatar came a day after the US bombed three Iranian nuclear sites, entering the air war in an unprecedented strike. Israel and Iran have traded missile fire for 11 days since a surprise Israeli attack on June 13.
The Israeli military said it hit "regime targets and agencies of government repression" on Monday, as its war in Iran widens beyond its initial nuclear aims. One strike damaged Evin prison in Tehran, a notorious jail for political prisoners.
An Israeli army spokesman said attacks on Tehran would continue in the "coming days". Israel said it had also struck airports, missile factories and and Islamic Revolutionary Guard Corps buildings.
Power cuts were reported in both countries as Iran hit back at Israel. The IRGC said it had launched a new ballistic missile known as Kheibar, which has several warheads, Iran's Tasnim news agency reported.
Mr Trump warned energy producers to keep prices down, as oil prices remained volatile. Brent oil futures dropped 6.4 per cent to their lowest in 10 days after the foiled attack on Qatar.
Several international oil companies operating in southern Iraq have flown out foreign employees, sources told The National. They said the withdrawal has not affected Iraq's oil production.
The US on Monday defended its intervention in the war, saying Iran posed an "imminent threat". But it was not clear how badly Sunday's dropping of "bunker-buster" explosives by B-2 bombers had damaged Iran's nuclear programme, which officials in Tehran insist is peaceful.
Rafael Grossi, the head of UN nuclear inspections, said Iran had told him it would take "special measures" to protect its nuclear material, hinting they could have been moved. White House press secretary Karoline Leavitt said the US had a "high degree of confidence" that enriched uranium was stored at the sites.
Israel launched air raids on Monday to block access to one of the sites, Fordow. Debate was raging in Israel over how long to continue the war, which began on June 13 with a surprise attack that killed several senior Iranian commanders.
Mr Netanyahu has said the fighting will stop when Israel's objectives are achieved but that it also "won’t finish too soon". Iranian regime targets struck on Monday included an intelligence directorate and a headquarters of the Basij militia, the Israeli military said. The Iranian judiciary acknowledged that Evin prison was damaged by an Israeli strike.
The judiciary's Mizan Online website said the situation remained "under control". Evin has been home to prominent western prisoners regarded as hostages of the Iranian regime, which Israel and the US have openly speculated about toppling.