A former inmate has claimed that LGBT+ prisoners are disproportionately subjected to solitary confinement. (Creative Commons)

Two men have been sent to prison in Tunisia because they were perceived to be gay.

The men, Achref, 20 and Sabri, 21, were sentenced on Friday to eight months in prison.

This comes after they were arrested on 7 December in the city of Sousse.

L’Express, a French newspaper, reports that the men were told by the police officer that he suspected they were gay.

According to the report, the police officer called gay people a “curse” on the country.

“Were you doing something with your boyfriend?” one of the police officers asked, according to the report.

Speaking to L’Express, Achref says the men were slapped around and made to sign a written confession of the allegations.

He also says they were anally probed.

Despite a result of “negative” from the test, the practice of which is widely discredited, a judge still sentenced the men.

The written statement claimed that the men had been engaged in “sodomy” in the street.

Despite the guilty verdict, the ruling still needs to be confirmed next month, and the men are currently on bail.