By Steve Holland and Susan Heavey
WASHINGTON (Reuters) -President Joe Biden has sent a rare message to Iranian Supreme Leader Ayatollah Ali Khamenei warning Tehran against targeting U.S. personnel in the Middle East, the White House said on Thursday after a spate of attacks on American forces in the region.
"There was a direct message relayed," White House spokesman John Kirby said at a news briefing, declining to elaborate.
Iran's mission to the United Nations did not immediately respond to a request for comment.
U.S. officials want to avoid a wider conflict in the Middle East following the Oct. 7 attack by the militant Hamas group on Israel that killed at least 1,400 people, mostly civilians.
About 900 additional U.S. troops are headed to the region or have recently arrived there to bolster air defenses to protect U.S. personnel amid a surge in attacks in the region by Iran-affiliated groups, the Pentagon said.
U.S. troops have been attacked at least 12 times in Iraq and four times in Syria in the past week, it added.
On Wednesday, Biden said he had warned the ayatollah the United States would respond if U.S. forces continued to be targeted but did not say how the message was communicated.
"My warning to the ayatollah was that if they continue to move against those troops, we will respond, and he should be prepared. It has nothing to do with Israel," he told reporters.
In a comment posted on social media before Kirby spoke, an aide to Iran's President Ebrahim Raisi disputed Biden's account.
"The US messages were neither directed to the leader of the Islamic Revolution nor were they anything but requests from the Iranian side. If Biden thinks he has warned Iran, he should ask his team to show him the text of the messages," Mohammad Jamshidi, a Raisi aide, wrote.
Separately, Iran's state news agency IRNA cited an unnamed source as saying the United States had sent Iran, as well some Iranian allies like Lebanese Hezbollah, messages that it was not seeking to expand the war and urging them to exercise restraint.
"The United States cannot both send military equipment to the Israeli regime and take charge of managing the war with one hand, while issuing political messages with the other hand, and speak about its opposition to the expansion of the war," IRNA cited the unnamed source as saying, adding Iran's allies "act independently and are not subject to Tehran's orders."
Israel has vowed to wipe out Hamas, which rules Gaza, in retaliation for the Oct. 7 attack in which the militant group also took about 200 people hostage. Israel has struck Gaza from the air, imposed a siege and is preparing a ground invasion.
Palestinian authorities say more than 7,000 have been killed, though Biden has voiced skepticism about such numbers. Reuters has been unable to independently verify the death toll.
On Thursday, Iran's Foreign Minster Hossein Amirabdollahian said at the United Nations that if Israel's retaliation against Palestinian militants Hamas in the Gaza Strip doesn't end, then the United States will "not be spared from this fire."
One way Iran projects power is by arming and funding militant groups, including Hezbollah in Lebanon, Hamas in the Gaza Strip, the Houthis in Yemen and Shi'ite militias in Iraq.
In the last such known U.S. retaliation, the U.S. military carried out multiple air strikes in Syria on March 23 against Iran-aligned groups it blamed for a drone attack that killed an American contractor, wounded another and hurt five U.S. troops.
(Reporting by Steve Holland and Susan Heavey in Washington; Additional reporting by Parisa Hafezi in Dubai; Writing by Arshad Mohammed; Editing by Doina Chiacu, Jonathan Oatis and Cynthia Osterman)