"It has been fully agreed by and between Israel and Iran that there will be a Complete and Total CEASEFIRE... for 12 hours, at which point the War will be considered, ENDED!," Trump said in a post on Truth Social.
"On the assumption that everything works as it should, which it will, I would like to congratulate both Countries, Israel and Iran, on having the Stamina, Courage, and Intelligence to end, what should be called, 'THE 12 DAY WAR'," Trump wrote on his Truth Social site.
The president's announcement comes after Iran's military said it had carried out a "devastating and powerful" missile attack on the Al-Udeid US air base in Qatar.
He earlier thanked Iran for giving the United States notice prior to shooting missiles at the military base, which he said made it possible for no lives to be lost.
Iranian authorities had threatened to retaliate against the United States after US bombers dropped bunker-busters on Iranian nuclear sites in Fordow, Natanz and Esfahan at the weekend in support of Israel.
Qatar's defence minister, quoted by al-Jazeera TV, said its air defences had intercepted missiles directed at the Al-Udeid air base, the largest US military installation in the Middle East, situated across the Gulf from Iran.
Qatari authorities and US officials said there were no casualties in the attack.
The attack came shortly after Qatar closed its airspace as a precaution and the US and UK urged its citizens in the country to "shelter in place".
Just before the explosions, Iranian President Masoud Pezeshkian wrote on the social platform X: "We neither initiated the war nor seeking it. But we will not leave invasion to the great Iran without answer".
Iran's military said its volley against Al-Udeid air base matched the number of bombs dropped by the United States on Iranian nuclear sites over the weekend.
Iran also said it targeted the base because it was outside of populated areas.
US military official says no US bases in Iraq were targeted but that a malfunctioning Iranian missile aimed at Israel triggered an alert in Iraq earlier in the day.
Earlier on Monday, Israel bombed a jail for political prisoners in Tehran in a potent demonstration that it was expanding its targets beyond military and nuclear sites to aim squarely at the pillars of Iran's ruling system.
Despite Iranian MPs' threats to challenge oil shipments from the Gulf, oil prices largely held steady, suggesting traders doubted Iran would follow through on any action that would disrupt global supplies.
Iranian Foreign Minister Abbas Araqchi met Russian President Vladimir Putin in Moscow as Iran sought backing from one of its last major power friends for its next steps.
with AP and PA