TRIPOLI (Reuters) - Gunmen raided two trendy seafront cafes in the Libyan capital Tripoli this month to banish unmarried couples and impose strict religious codes, witnesses said, in a move that has alarmed civil liberties defenders.

The identity of the armed men has not been confirmed, but the episode appears to reflect the rise of Islamist currents, including hardline Salafism, in some of the powerful armed groups that the authorities rely on to keep order.

The raids, the latest of several incidents in eastern and western Libya to worry human rights advocates, add a fresh layer of uncertainty to a city under assault by an eastern-based force that aims to win power nationally.

Both cafes targeted are in the upscale Hay Andalus neighborhood, just west of central Tripoli.

At one, Eleanor, “a group of armed men stormed the cafe with their guns and started questioning the men, to see if they were accompanied by a woman who was a close relative, or by a friend,” on Oct. 6, a witness said, speaking on condition of anonymity.

“Men who were sitting with (female) friends were taken out of the cafe by the armed group ... they took them into their vehicles for a couple of minutes then released them,” the witness said. “The men came in again to pay the bills and left.”

At another cafe on the same seafront stretch, more than 30 masked, armed men in military uniform swept in one morning earlier this month, said a witness.

The armed men asked to see marriage certificates, telling women they had to be accompanied by their husband or a brother. “I was very scared,” the witness said. “After five minutes the cafe was empty. Even the men left.”

The gunmen said they wanted the family section of the cafe - designed for women and their relatives but also frequented by some single women and couples - shut down.

BACKLASH

“They said the next time, if we find something like this, we’re going to close it,” said the witness.

At least two other cafes nearby put messages on Facebook saying they would no longer admit unmarried couples or single men, despite there being no law against such mixing in Libya.

On social media the raids sparked a wave of criticism against the Special Defence Force (SDF), Tripoli’s most powerful Salafist-leaning group, which has modeled itself as the capital’s primary anti-crime and counter-terrorism force.

An SDF spokesman denied the force had stormed cafes in Hay Andalus. The Nawasi brigade, another armed group, which is also Salafist leaning, could not be reached for comment.

The two armed groups are among several which patrol Tripoli at the behest of Libya’s internationally-recognized government, which is based in the capital and competes with eastern-based commander Khalifa Haftar to establish national control.

Tripoli’s armed groups are nominally under the interior ministry but retain broad autonomy.

The groups also help defend the city from a six-month-old assault by Haftar, who says he seeks to bring Tripoli’s militias to heel and rid western Libya of radical Islamists. Haftar’s forces also include Salafists within their ranks.

The cafe raids showed that armed groups could still act with impunity in Tripoli, said a women’s rights activist, who asked not to be named for fear her comments would be politicized.

They also reflected a backlash by religious radicals against the increasing presence of women in public spaces, she said. “They really want to push back women to their houses and to stop these social changes happening.”

Twitter users opposed to the raids launched the hashtag: “No to moral and religious guardianship, yes to a civilian state.”

(This story clarifies name of force in paragraph 13)