A 10-month-long mystery surrounding a rape case wherein identical twins both ended up in prison in France was finally resolved on Monday.

Identical twins Yoan and Elvin Gomis, 26, were both taken to police custody without bail, but neither confessed to committing the crimes.

For the past 10 months, the police were unable to determine which of the male twins was responsible for a series of sex attacks in Marseille, France that took place between September 2012 and February 2013, according to the Daily Mirror UK.

The investigators had to face running extensive tests on the twins to tell them apart, which have cost them up to a million euros.

"It's a rather rare case for the alleged perpetrators to be identical twins," Emmanuel Kiehl, the chief investigator in the case, told the French media, according to The Telegraph.

This is backed up by the fact that the twins live together. They also shared the same clothes, car and telephones, and they even have a joint Facebook account. 

However, the mystery was finally solved on Monday when one of the twins confessed to committing three rapes, three attempted rapes and sexual assault in court after some of the victims were able to identify their attacker based on the fact that he stutters and is partially deaf.

Elvin was immediately released and the charges against him were dropped. Despite all of this, Yoan's lawyer revealed that the twins' relationship had not faltered.

"They have never mentioned it. (Elvin) absolutely does not hold it against him. It is all part of the mystery of twins," Vanessa Cerda said, according to Agence France-Presse.