The Shetland season 8 ending has tied up all the loose ends of what has been a seriously gripping series... and what finale it was!
With a dark family secret revealed and the truth about who killed Ellen now out, here is everything you need to know about what happened in Shetland season 8, episode 6.
With the knowledge that Ellen went home to the Bain farm on the night she was killed, Tosh and Calder are convinced that the family knows a lot more than they have been letting on.
As the police arrive at the farm, along with a search warrant and a team of forensics, the family flies into a panic about what the police might unearth. However, it soon becomes clear that some of the family know more about what happened to Ellen than others.
While Bobby is arrested and questioned at the police station, Ellen's coat is found in the lambing barn and soon it is Ellen's little brother Rory who is being grilled about his sister's final hours.
While Rory admits that he saw Ellen after she knocked on his bedroom window in the middle of the night, he reveals that as he was going to get a first aid kit for her, she disappeared. Stella is stunned that Rory didn't mention this before, but Rory admits that he promised Ellen he wouldn't tell a soul that she was there.
But that isn't all Rory reveals, he also admits that as he went back to bed, he saw his grandmother's bedroom light was on.
Calder and Tosh turn their attention to Grace, but while she is initially adamant that she didn't see Ellen, it turns out that she did and that they had argued. However, she remains tight-lipped about why she let her granddaughter leave in the middle of the night.
Meanwhile, the date September 17 becomes a lead for Tosh and Calder when they see that it is marked in Ellen's calendar and also it was a date that saw Ellen block her uncle Bobby's calls. The police initially consider the fact that Bobby had been abusing his niece, however, his reaction to Ellen's death makes them believe otherwise.
It turns out that September 17 was the date that Kenny Bain, Grace's late husband, died and that the family always got together on that date to remember him. But still, Tosh and Calder can't work out what happened between Bobby and Ellen that night to cause them to fall out... and it is only when Bobby calls Ellen 'my family' during questioning that the penny drops.
Having got a pathologist to do a DNA comparison, Tosh and Calder unearth the big Bain secret - that Kieran wasn't Ellen's dad, but Bobby was. As Bobby confesses to incest in a police interview, he then reveals that he told Ellen the truth on September 17 and that is why she blocked him.
Over at the Bain farm, Tosh breaks the news to Stella that everyone knows about her one-night stand with her brother and she confirms that she isn't a victim and that the pair of them got drunk while lost in their grief for their father, and one thing lead to another. But when Stella tells Tosh that she is grateful for the fact Ellen never knew, it is up to Tosh to break the news that her daughter did know, and that it was Bobby who told her.
As Stella is devastated that Ellen knew the dark truth about how she came into the world, Grace is still being held in a cell. But as she begs Calder not to let her family secret become public knowledge, Calder realises that she didn't know the truth about Bobby and Stella until the night Ellen died.
The truth about who killed Ellen finally emerges when Rory admits to his dad that he didn't tell the police everything about the night Ellen died, because he left out the bit about Kieran's van not being at the farm.
Kieran is clearly hiding something, especially when the police also realise Kieran could be Ellen's killer and as they close in on him, he races away in his van and ends up going to the remote spot where Ellen's body was found. Calder follows him and he finally breaks down, confessing that he found a wound-up Ellen wandering around the farm at night and took her for a drive to get her to calm down.
However, it was only when the pair got into a heated argument and a distraught Ellen lashed out and yelled at Kieran that he wasn't her dad that Kieran flipped and strangled her to stop her shouting. Devastated at what happened, Kieran breaks down as he is arrested.
As the series wraps up, Calder is upset when Tosh hands her a report into Cal's death and it reveals it was purely an accident, which has been put down to the amount of alcohol and drugs in his system.
Calder then announces to a surprise Tosh that she is staying on Shetland for a little longer, wanting to build bridges with her brother, Alan.
Tosh admits they still haven't found the missing money that Ellen stole in London, and we soon see that Bobby still had it but has given it to Tom Knox - perhaps as a way of making amends for the way his family treated him.
Finally, Calder goes to see James and the pair talk about Cal, and James gives Calder a mixtape that she and Cal made years ago. It reminds her of their teenage love and she visits the beach they used to meet on and goes for a swim in the sea, just like Cal did all those years ago...
All episodes of Shetland season 8 are now available on BBC iPlayer.