Patrick Dempsey makes dramatic exit from Grey's Anatomy
Spoiler warning: Contains plot details for an episode not yet aired in the UK.
Actor Patrick Dempsey has made a shock exit from hit US drama Grey's Anatomy.
Dempsey's character Dr Derek Shepherd - known as McDreamy - bowed out of the medical drama in a dramatic sequence during the 11th series.
Fans saw Dr Shepherd's car being hit by a truck, minutes after he had saved four victims of another car accident. He later died of his injuries.
His final episode, which aired in the US on Thursday night, was written by show creator Shonda Rhimes.
Dempsey's departure had not been trailed. However, some subscribers to US magazine Entertainment Weekly were left furious when their copies arrived early, breaking the story hours before the plot twist aired.
In a statement, Rhimes praised Dempsey's performance as the much-loved McDreamy, who is married to fellow doctor and titular character Meredith Grey, played by Ellen Pompeo.
"Derek Shepherd is and will always be an incredibly important character - for Meredith, for me and for the fans," said Rhimes.
"I absolutely never imagined saying goodbye to our 'McDreamy'.
"Patrick Dempsey's performance shaped Derek in a way that I know we both hope became a meaningful example - happy, sad, romantic, painful and always true - of what young women should demand from modern love. His loss will be felt by all."
She said both the show and the character of Meredith Grey - now a single mother of two - were about to "enter uncharted territory".
Dempsey has appeared on screen less frequently this season, but his departure came as a surprise to many fans, as he was reported to have signed a contract to remain in the show until season 12 in 2016.
TV network ABC said the actor was "moving on to pursue other interests" and called the doctor an "iconic character" who would be "greatly missed".
His final scenes saw him being taken to the same small local hospital as the people he had just saved, where doctors botched his treatment.
Many fans were devastated by the loss of one of their favourite characters.
Krissy Brady wrote on Twitter: "I have a feeling therapists worldwide are going to make a fortune tomorrow."
Another fan tweeted: "Well there you have it. That was the final episode of Grey's Anatomy I will watch #RIPMcDreamy"
The episode - titled How to Save a Life, after a song by The Fray - will air on 6 May on Sky Living in the UK, two weeks behind the US.
It was the first episode written by Rhimes since the season eight finale.