On Tuesday, authorities had arrested two French members of the controversial feminist campaign Femen after they protested topless in front of a Rabat landmark against Morocco's treatment of gays.
The women, one of whom had the slogan “in gay we trust” written in black on her torso, were expelled on Tuesday evening.
They had protested in front of the Hassan Tower, a landmark minaret in Rabat.
In an apparent act of solidarity, the two Moroccan men went to the site on Wednesday and kissed, the news website Goud reported.
The interior ministry said the pair were arrested for “an obscene act”.
It also reported that a Spanish woman, said to have links with the Femen protest, had been expelled from Morocco.
The interior ministry denounced what it said was “a series of provocations and harassment carried out by foreign organisations who deliberately violate Moroccan laws… to undermine morality.”
Homosexuality is considered a crime in Morocco.
Article 489 of the penal code states that any one found guilty of carrying out “a deviant act with a person of the same sex” will be jailed for to up to three years.
Last week three men accused of homosexuality were jailed to three years each.
In March, Human Rights Watch called on Morocco to decriminalise homosexuality, saying that “criminalising consensual, adult homosexual conduct violates international human rights law”.