​TEHRAN — Iran’s top leader said Wednesday that the United States was using “money and sexual attractions” to try to infiltrate the Islamic republic and warned Iranians not to fall into the “enemy’s trap.”

Iran’s supreme leader, Ayatollah Ali Khamenei, told commanders of the Islamic Revolutionary Guards Corps that the authorities should take concerns about “infiltration” seriously and that political factions should not use the issue against each other.

“The enemy sets up a network within a nation and inside a country mainly through the two means of money and sexual attractions to change ideals, beliefs and consequently the lifestyle,” Ayatollah Khamenei said in comments posted on his website and broadcast on state television.

His comments appeared to lend support to a recent wave of arrests of pro-Western writers and journalists, which hard-liners in the judiciary and security services have said is necessary to prevent Western infiltration.

Iran’s moderate president, Hassan Rouhani, this month criticized the arrests, saying hard-liners are “exaggerating the issue” and misusing Ayatollah Khamenei’s warnings as an excuse for the detentions.​