Russia and Iran have stepped up coordination inside Syria as they move to safeguard President Bashar al-Assad’s control over his coastal stronghold, according to officials in the U.S. and Middle East, creating a new complication for Washington’s diplomatic goals.

Senior Russian and Iranian diplomats, generals and strategists have held a string of high-level talks in Moscow in recent months to discuss Mr. Assad’s defense and the Kremlin’s military buildup in Syria, according to these officials.

The buildup is continuing: On Monday, U.S. defense officials said Russian surveillance drones have started flying missions over Syria, and Moscow has sent two dozen more fighter jets to Syria.

Much of the activity from both sides in recent months has been concentrated in the coastal region of Latakia, the base of Mr. Assad’s family and his Alawite sect, which has come under pressure from rebel forces to the north, threatening to cut it off from the capital Damascus.

Coordinating efforts cited by the U.S. and Middle East officials included a secret visit in late July by the commander of Iran’s elite overseas military unit, the Qods Force. Maj. Gen. Qasem Soleimani directs Tehran’s military and intelligence support for the Assad regime and is one of the most powerful leaders of the Islamic Revolutionary Guard Corps, or IRGC.

Iranian Foreign Minister Javad Zarif also visited Moscow last month to discuss Syria and other issues with his Russian counterpart, Sergei Lavrov.

Such visits “all come within the framework of this coordination,” Syrian Foreign MinisterWalid al-Moallem told state media last week, referring specifically to the trip by Mr. Zarif and a deputy. “There is deep coordination on all levels between us and Moscow, and between us and Tehran, and I can say to whomever wants…they can join too.”

U.S. officials said they haven’t unraveled the full extent of the cooperation or its intention. “We assume [the Russian buildup in Syria is] being coordinated with the Iranians,” said a senior U.S. official, who said the U.S. tracked Gen. Soleimani’s trip to Moscow.

IRGC military advisers and soldiers are also deployed in Latakia, as well as soldiers from Tehran’s close political and military ally, the Lebanese militia Hezbollah, they said.

A U.S. defense official said the Pentagon believes Gen. Soleimani’s trip to Moscow was “very important” in relation to the Russian buildup in Latakia. “What we are seeing now is the manifestation of that meeting, and that there is some sort of Iran nexus,” the official said.

The coordinated Iranian and Russian support for Mr. Assad poses a formidable obstacle to the diplomatic aims of the Obama administration, which wants to remove the Syrian dictator from power.

As support from Moscow and Tehran pours into Syria, the U.S. has moderated its demands that Mr. Assad step down before a transition takes place.