President Donald Trump said Tuesday that Iran will pay a heavy price for any attack on the American embassy in Baghdad amid protests against U.S. airstrikes in Iraq over the weekend.

In a pair of tweets, Trump said the diplomatic compound is safe and additional forces had arrived on the scene. He also thanked the Iraqi leadership for their response to the demonstrations.

"Iran will be held fully responsible for lives lost, or damage incurred, at any of our facilities. They will pay a very BIG PRICE! This is not a Warning, it is a Threat," he wrote.

Earlier in the day, thousands of Iraqi protesters stormed the U.S. embassy compound, protesting against the airstrikes Sunday in Iraq and Syria against the Kataib Hezbollah militia group which killed at least 25 fighters.

That airstrikes were in response to a rocket attack Friday on a U.S. military base in Kirkuk, blamed on Kataib Hezbollah, which is part of the Iran-backed Hashd al-Shaabi group, or Popular Mobilization Forces.

Friday's attack killed one U.S. contractor and wounded four U.S. service members.

Iraqi Prime Minister Adil Abdul-Mahdi said Baghdad condemns the airstrikes on Iraqi military elements and warned those taking part in funeral marches to stay away from foreign buildings and compounds.

"Iraqi security forces will respond to any act of aggression or harassment against foreign embassies in Iraq, and those responsible will face the full force of the law," Abdul-Mahdi said on Twitter.