The US military on Monday identified two soldiers killed in action recently as part of the war with Iran.

The defense department said in a statement that 1Lt Tyler James Feehan, 25, of Ewa Beach, Hawaii, and Pvt Isabella Gonzales, 19, of Carrollton, Texas, were killed in Jordan, where they were supporting a US mission against the Islamic State group. It is unclear how they were killed.

On Saturday, the US Central Command said two service members were killed in Jordan while defending against Iranian ballistic missile and drone attacks.

The US military has said the total number of deaths in the war with Iran, which was started in late February, is 17.

The White House’s Rapid Response account on the social media platform X posted a statement from Donald Trump that said, “Every time Iran kills an American Soldier they will pay for that killing many times over!” The president’s statement also said “this directive has been passed on to” various US military leaders, including Pete Hegseth, the defense secretary.

In her own statement on X, Karoline Leavitt, the White House press secretary, wrote Trump would “attend the dignified transfer of our fallen heroes” on Tuesday evening at Dover air force base in Delaware. Leavitt’s statement added that the president “and the entire White House are praying for their families”.

The deaths reflect the complicated reality that US soldiers do not need to be on the ground in Iran for there to be lethal risks in a conflict that involves drones, missiles and airplanes. American forces are arrayed across the Middle East, making other countries targets of Iran as the fighting has escalated after a breakdown in peace talks.

The latest US military death from the conflict was on Saturday in northern Iraq when an American service member was killed during a “controlled detonation” of unexploded ordnance from a downed Iranian drone, US Central Command said on Sunday. A second service member was wounded and was receiving medical treatment for a minor injury.

The military said it was withholding additional information until 24 hours after families had been notified.

The deaths in the war are not limited to American soldiers.

Iranian authorities said at least 50 civilians had been killed and more than 500 wounded in US strikes in the past three weeks, including eight people killed in a strike on a bridge on Friday.

People working on ships, as well as foreign workers and others in Gulf countries, Israel and Lebanon have also perished in the conflict.

Trump has said the war on Iran is necessary to stop Iran from developing nuclear weapons. Far from the conflict, the war’s effects on the prices of fuel and other goods have hit some of world’s most vulnerable areas hard.

Guardian staff contributed reporting