The parents of missing Madeleine McCann have lost a legal battle against a Portuguese former policeman who claimed in a book that they were involved in their daughter's disappearance on the Algarve in 2007.

Portugal's Supreme Court ruled that the book – written by detective Goncalo Amaral – was permissible under freedom of expression laws.

Three-year-old Madeleine vanished from a holiday apartment in Praia Da Luz on 3 May 2007 as her younger twin siblings, Sean and Amelie, slept. Parents Gerry and Kate were dining with friends nearby, returning regularly to check on the children. Kate returned to find her missing at 10pm and called the police. No trace of the child has ever been found.

The McCanns were officially listed as "arguidos" or persons of interest until 21 July 2008. The parents have always denied any involvement and continue to appeal for information.

Amaral, one of the police officers investigating the girl's disappearance, wrote a book called Maddie: The Truth Of The Lie, which was published three days after the McCanns were cleared. In the book, he claimed Maddie died inside the apartment and her parents conducted an elaborate hoax to cover this up. Amaral was sacked when the book was published.

Kate and Gerry won a libel case against Amaral in 2015 and he was ordered to pay them €500,000 (£429,000) compensation. Amaral appealed the decision the following year and won so the McCanns took the case to the Supreme Court.

However, the court has now ruled in favour of Amaral, stating that his book was "not abusive and "was within admissible limits in a democratic and open society, which excludes the illegality of possible damage to the honour of the McCanns".

The McCanns, already struggling to meet the costs of funding the search for Madeleine, must now pay the detective €500,000 plus interest and legal fees. It is also believed that Amaral could now sue them for damages.

The Metropolitan Police investigation into Madeleine's investigation, Operation Grange, remains open. Anyone with any information should contact the team on