Christian Brueckner, the German man who is the only suspect in the disappearance of Madeleine McCann, could walk free in a matter of days.
A paperwork mix-up could reportedly see Brueckner walk out of jail.
Lawyers have now claimed the 43-year-old convicted paedophile should never have been tried for the rape of a woman in 2005.
Reports state his lawyers claim the charge was not added to the European arrest warrants used to extradite him from Portugal to Germany.
According to EU law, suspects extradited on the basis of those warrants can only be prosecuted for crimes listed in those same documents.
That technicality could see Brueckner walking out of prison as early as August 6.
He is currently serving a 21-month-jail sentence in Kiel, northern Germany, relating to drug offences.
However, his seven-year jail sentence for the rape of the elderly woman could be deemed "unconstitutional".
Prosecutors want to keep him in prison while they probe his alleged involvement in the 2005 disappearance of Madeleine McCann.
Brueckner was extradited from Portugal to Germany in 2017, where he was jailed for sex offences against children.
He was released from prison in August 2018, but officials put him under surveillance and told him to report in once a month.
Instead he fled the country.
He was arrested in Milan and extradited to Germany, where he is jailed for drug offences dating back to 2011. He's also received a seven-year sentence for the rape of an elderly woman.
Portuguese police last week reportedly launched a search for Madeleine McCann's body in the Algarve.
The search begun after authorities found "fundamental evidence" they say is linked to Brueckner, the prime suspect.