Two male political dissidents claim they were raped in Egyptian police custody in separate assaults that campaigners suspect are indicative of a wider strategy as the brutal crackdown on opposition continues.

Plainclothes officers allegedly assaulted Omar el-Shouekh, 19, inside an east Cairo police station on 24 March, minutes after he was arrested following a student protest. In written testimony provided to the Observer by his lawyer, Shouekh also alleged that he was beaten and given electric shocks.

A second man, Fadi Samir, said he was sexually assaulted in similar fashion in a different police station on 8 January. Samir also alleged that throughout his subsequent 42-day detention, he was frequently beaten and at one point groped by a policeman while at a urinal. Like many detainees, Samir alleged that prosecutors interrogated him on police property rather than neutral territory – failing to maintain an adequate separation of powers between Egypt's judicial system and the police force.

Though their treatment is comparable, the two men come from radically different backgrounds, and this illustrates the breadth of dissent against the Egyptian government. According to government figures, at least 16,000 dissidents – mainly Islamists, but increasingly secular activists, too – have been arrested since the start of the crackdown on political opposition that began last July.

Some have been released, but thousands are still incarcerated, and many allege they are detained arbitrarily – with judges habitually renewing detentions en masse every 45 days, without reviewing specific evidence against individuals. There have also been countless allegations of torture by police.

Shouekh is a leader of the university protests that have disrupted Egypt's campus life for most of this academic year. He comes from a family of Muslim Brotherhood supporters who have opposed the current administration since the removal of the Brotherhood's Mohamed Morsi from the presidency last July. By contrast, Samir is a Christian who celebrated Morsi's ousting but who also, like many secular activists, subsequently came to oppose the authoritarianism of his successors.

In testimony smuggled from police custody by his family, Shouekh alleged that his sexual assault "happened in a repeated way". He also said he was later tortured with shocks to his genitals, armpits, fingertips and stomach, and beaten throughout his detention. A friend who visited him in jail last week said his condition appeared to have substantially worsened.

Samir said his molestation occurred during a brutal interrogation that took place shortly after his arrest at a protest in central Cairo. After being blindfolded and beaten several times on his back and neck, he was questioned about his political beliefs by an officer.

"He asked me many questions, but he didn't like my answers," Samir said. "So he asked [a junior policeman] to put his middle finger in my ass. And he did it, twice."

Interviewed in the eastern city of Suez, Shouekh's mother has waived his anonymity in an attempt to give his plight more attention, while Samir has waived his to highlight worsening police brutality. Campaigners said it was very rare for detainees to go public about such an experience, though similar allegations were frequently made in private.

Mohamed Lotfy, co-founder of the Egyptian Commission for Rights and Freedoms, an independent rights group, said: "It has become more and more common to hear from detainees that they were sexually assaulted or harassed, and it seems that the tactic is being used to humiliate the detainee, and to make them feel powerless, and under the control of the police.

"These cases demonstrate how empowered the police feel, and how above the law they feel, and how little respect they have for legal protection or moral consideration," he said. "The police feel so confident about themselves that they can break all rules,and even taboos of Egyptian society, to degrade the detainee."

But a significant section of Egyptian society supports a strong police force. Tired of three years of political instability sparked by the 2011 revolution, and fearful of a wave of jihadist activity, many see heavy-handed policing as the only means of restoring order, and often confuse the actions of jihadist militants with those of political activists.

After 529 alleged Morsi supporters were sentenced to death in a very brief mass trial, many Egyptians applauded the verdict. "Today, we got justice, the justice that we want," said Rania Badawy, while presenting a show on the private Tahrir TV channel. "We are tired of your violence. We will build the country despite your war."

When asked to comment on the allegations of rape, a spokesman for Egypt's interior ministry – which oversees the police service – said any alleged victims of torture should make an official complaint either to state prosecutors or to the ministry's human rights wing.

According to his testimony, Shouekh did highlight his treatment with prosecutors at his first judicial hearing, but his complaint was ignored.