Australian schoolgirl Tiahleigh Palmer was 12 years old when she came home from dance class and was murdered by her foster father.

Hours earlier, Rick Thorburn had learned that that his teenage son, Trent, had sexually assaulted her. They feared she might be pregnant.

So the Queensland man killed Tiahleigh and dumped her near-naked body on a river bank.

On Friday, he was sentenced to life in prison. Justice David Boddice described the murder as "cold, calculating and callous".

Thorburn's wife and two sons have already been jailed for their roles in a case which has horrified Australia.

The killing also led to a review of Queensland's foster care system, and changed police alerts about vulnerable children.

What happened to Tiahleigh?

Tiahleigh had been in care since she was seven. She had been living full time with the Thorburn family in Logan City, 45km (28 miles) south of Brisbane, since January 2015.

On 30 October that year, her foster family reported her missing.

Rick Thorburn told police he had last seen her when he dropped her off at school that morning.

After a police search - which Thorburn helped with - Tiahleigh's body was discovered a week later, on a river bank about 50km (31 miles) from the family home.

She was found in just her underwear, and her body was so decomposed that police could not determine at first whether it was a boy or girl.

About 600 people attended the funeral in November, where Thorburn, wearing a purple shirt emblazoned with Tiahleigh's name, helped carry the casket.

Anonymous tip-off

The police investigation into her death continued but with no substantive leads. A post-mortem revealed a bruise on Tiahleigh's head but no further clues as to how she died.

Police interviewed scores of school friends and offered a A$250,000 (£140,000; $190,000) cash reward for information.

Tiahleigh's birth mother, Cindy Palmer - who had only recently given up her parental rights - made a public appeal.

Seven months after the killing, police received a phone tip-off. An anonymous caller told them Trent Thorburn - Rick Thorburn's son - may have had sex with Tiahleigh. Police were also informed of a family meeting that took place on the night she was murdered.

The Thorburns were hauled in for questioning and, it later became clear, lied to police.

Police then bugged the family home where they heard the parents coach the sons on their stories. They also found a Facebook messenger chat where Trent confided in his cousin that he may have got Tiahleigh pregnant.

In September 2016, police charged Rick Thorburn with the murder of Tiahleigh, interference with a corpse, perjury and attempts to pervert the course of justice.

'Deal with this properly'
Prosecutors would later tell Brisbane Supreme Court that Thorburn had acted of his own accord to kill the girl to protect his son.

He had killed her when the rest of his family was out of the house on 29 October.

That night he told his family: "Don't ask any questions. I have taken care of it."

Concerned about Tiahleigh's potential pregnancy, he had told his wife: "We need to think this through, deal with this properly."

The family maintained the secret in the months following the murder, which gained national attention.

Trent Thorburn was later charged with incest and perjury offences. His brother Josh, 20, and mother Julene, 54, were charged with perverting the course of justice.

They all pleaded guilty in separate trials last year. Trent received a four year sentence, but was released on parole in January. His brother and mother have completed three and six month sentences respectively.

'No sentence will ever be enough"
The case sparked a review of Queensland's child protection system which recommended stricter criminal checks for foster carer applicants and children's workers.

New requirements were brought in for schools to check with caregivers as soon as a child in care doesn't turn up at school.

Police had been criticised for their delay in making their missing person report public. Now, they no longer need to gain permission from child welfare services before issuing alerts about missing foster children.

In court on Friday, Rick Thorburn wept as he pleaded guilty to murder.

A statement read out by his lawyer said that "not a day goes by that he's not haunted by what he has done".

In sentencing the 57-year-old to a minimum 20 years without parole, Justice David Boddice said Thorburn's actions were "truly appalling".

"You showed no respect for her, even in death - you murdered this defenceless child who relied on you for protection."

Tiahleigh's biological family were also in court, wearing #Justice4Tiahleigh t-shirts.

Speaking to the media afterward, Cindy Palmer told reporters the day marked the end of her family's fight for justice.

"But as her mother, no sentence will ever be enough," she said.

"Tiahleigh was a beautiful, young girl who had her whole life to look forward to. Rick Thorburn took that away from me, from our family and most importantly from Tiahleigh."