UPDATE 1-Biden sent message warning Iran's Khamenei against targeting US troops

(Adds Iranian quotes, details, background, new throughout)By Steve Holland and Susan HeaveyWASHINGTON, Oct 26 (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.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 Middle East 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.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.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."Story continues"I say frankly to the American statesmen, who are now managing the genocide in Palestine, that we do not welcome (an)expansion of the war in the region. But if the genocide in Gaza continues, they will not be spared from this fire," he told a meeting of the 193-member General Assembly on the Middle East.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; Writing by Arshad Mohammed; Editing by Doina Chiacu and Jonathan Oatis)