U.S. officials say Iran is dispatching increasing numbers of trainers and advisers — including members of its elite Quds Force — into Syria to help crush anti-government demonstrations that are threatening to topple Iran’s most important ally in the region.

The influx of Iranian manpower is adding to a steady stream of aid from Tehran that includes not only weapons and riot gear but also sophisticated surveillance equipment that is helping Syrian authorities track down opponents through their Facebook and Twitter accounts, the sources said. Iranian-assisted computer surveillance is believed to have led to the arrests of hundreds of Syrians seized from their homes in recent weeks.

The United States and its allies long have accused Iran of supporting repressive or violent regimes in the region, including Syria’s government, the Hezbollah movement in Lebanon and Hamas in the Gaza Strip. Many previous reports, mostly provided by Western officials, have described Iranian technical help in providing Syria with riot helmets, batons and other implements of crowd control during 10 weeks of demonstrations against President Bashar al-Assad.

The new assertions — provided by two U.S. officials and a diplomat from an allied nation, all of whom spoke on the condition of anonymity to describe sensitive intelligence — are clearly aimed at suggesting deepening involvement of Iranian military personnel in Syria’s brutal crackdown against anti-Assad demonstrators.There was no response on Friday to requests for comment left with the Syrian Embassy and Iranian interests section in Washington.

In the account provided by the diplomat and the U.S. officials, the Iranian military trainers were being brought to Damascus to instruct Syrians in techniques Iran used against the nation’s “Green Movement’’ in 2009, the diplomat said. The Iranians were brutally effective in crushing those protests.

Officers from Iran’s notorious Quds Force have played a key role in Syria’s crackdown since at least mid-April, said the U.S. and allied officials. They said U.S. sanctions imposed against the Quds Force in April were implicitly intended as a warning to Iran to halt the practice.

The Quds Force is a unit of Iran’s Islamic Revolutionary Guard Corps responsible for operations outside the country. It has helped fund and train Hezbollah and Hamas militants and supported anti-U.S. insurgents inside Iraq.

While the size of the Iranian contingent in Syria is not known, the numbers of advisers has grown steadily in recent weeks despite U.S. warnings, according to the U.S. and allied officials.

The Obama administration mentioned the role of the Quds Forces in announcing two sets of sanctions imposed against Syrian government officials in the past month. A White House executive order last week that targeted Assad and six other top government officials also included a little-noticed reference to Mohsen Chizari, an Iranian military officer who is the No. 3 leader in the Quds Force in charge of training.

The naming of Chizari — who in 2006 was arrested but later released by U.S. forces in Iraq for allegedly supplying arms to insurgents there — suggests that officials possess evidence of his role in assisting Syria’s crackdown on protesters, said Michael Singh, a former senior director for Middle East affairs for the National Security Council during George W. Bush’s administration.

“There’s a deeply integrated relationship here that involves not only support for terrorism but a whole gamut of activities to ensure Assad’s survival,” Singh said.

It is not unusual for governments to draw on foreign assistance during times of unrest, as Western-allied governments in Bahrain and Egypt did when protests were building in those countries.

Iran’s increasing engagement in the Syrian crackdown reflects anxiety in Tehran about the prospects for Assad, who has failed to end the protests despite rising brutality that human rights groups say has left more than 800 people dead and perhaps 10,000 in prison. While managing to hold on to power, Assad has been severely weakened after months of Syrian unrest, according to current and former U.S. officials and Middle East experts.

“Iran is focused intently on how things are evolving in Syria,” said Mona Yacoubian, a former Middle East expert with the State Department’s intelligence division and who is a special adviser to the U.S. Institute of Peace. “The two countries have a long-standing alliance of 30 years-plus. Syria is Iran’s most important inroad into the Arab world, and its perch on the front line with Israel.”

Assad, whose army is stretched across dozens of cities in an unprecedented domestic deployment, increasingly needs help to survive, Yacoubian said. And Iran desperately needs Assad. “If they lose the Syrian regime, it would constitute a huge setback,” Yacoubian said.

Iran, a longtime supplier of military aid to Syria, has been helping Dasmascus battle the current wave of civil unrest since at least mid-March, said the U.S. and allied officials. The emergence of Syria’s first true mass protests — with tens of thousands of demonstrators pouring into the streets demanding Assad’s ouster — initially flummoxed the country’s security leaders, who had little experience with such phenomena.

On March 23, Turkish officials seized light weapons — including assault rifles and grenade launchers — on an Iranian cargo plane bound for Syria. Whether the shipment was intended to help suppress the uprising is unclear, but around the same time, Syria received other Iranian shipments that included riot control gear and computer equipment for Internet surveillance, the U.S. and allied sources said.

Just before the shipments, Assad announced with great fanfare that he was lifting the country’s ban on the use of social media such as Facebook and YouTube. While widely hailed at the time, the move gave Assad’s security police an Iranian-inspired tool for tracking down leaders of the protest movement, said Andrew Tabler, a former Syria-based journalist who is a Syria expert at the Washington Institute for Near East Policy.

“Lifting the ban on Facebook helped the regime pinpoint where the [activists] were coming from,” Tabler said in an phone interview from Lebanon, where he remains in contact with opposition figures. “It was not about being magnanimous; it was a way to allow more surveillance, leading to thousands of arrests.”

Researcher Julie Tate contributed to this report.