TVshows tend to have it much harder than movies when it comes to theirfinal scenes. It’s virtually impossible to condense the fundamental essence of a series with dozens of episodes into a single scenario lasting several minutes at the most. Some of the most imaginative TV endings don’t even try to do so, taking a different approach altogether.

Many of thebest TV shows of all timehave had their legends cemented by perfect final scenes, which leave us with a parting image of our favorite characters that endures long after their time on the small screen has come to an end. Yet, even series we count among the greatest ever manage to get their final scenes wrong.

The final “Nine-Nine!” chant in Brooklyn Nine-Nine

Ending ashow with an unforgettable final shotor a last scene worthy of its legacy is an achievement that eludes a significant proportion of the all-time greats. Meanwhile, some lesser series have managed to leave their mark on TV history with outstanding final scenes that exceeded our expectations.

The closing moments of a television show also differ depending on the genre. A supernatural drama could hardly be expected to end the same way as an animated sitcom, for example. But if there’s one thing that unites every show in this list, it’s that they use their finale scenes to leave a lasting impression we’ll always remember them by.

Hallee Hirsh as Rachel Green in ER Series Finale Ending

20Brooklyn Nine-Nine

Another Halloween Heist

Brooklyn Nine-Nineendswith most of the show’s main characters having left their old police department behind. But as the closing credits roll on the sitcom’s final episodes, there’s still time for them to surprise those who remain by announcing that the precinct’s tradition of Halloween Heist challenges is set to continue. It’s the happiest ending we could imagine.

19ER

Dr. Greene

For its final bow, ER decides to do what it does best, throwing us right into the thick of the action following an explosion at a power substation. This classic emergency response scene features an incredibly poignant moment which references thedeath of Dr. Mark Greenein season 8.

For the first time in the show, Mark’s daughter, Rachel, is called on to work as a fully-fledged medic. Hearing Carter refer to her as “Dr. Greene” inevitably brings a tear to the eye.

Miranda, Carrie, Charlotte, and Samantha walk in a line on the streets of New York City in the series finale of Sex and the City

18Sex And The City

“The Most Challenging & Significant Relationship Of All”

Sex and the Cityendedafter six seasons due to financial disagreements between main cast members and HBO, but not before a stirring final sequence, in which the four female leads reunite, and Carrie Bradshaw gives one last monologue. She saved the best till the very end, reminding us all that the most important relationship we have is with ourselves.

17Life On Mars

Jumping Back Again

After two seasons in 1973, Sam Tyler manages to secure his future as a police detective in the 21st century, once and for all. At least, it seems that way, until Sam realizes he much preferred life as a cop back in the 1970s.

As David Bowie’s title song swells once again, Sam takes an antiheroic leap of faith, potentially killing himself in the hope that he’ll go back to working with Gene Hunt. This extraordinary final twist is beautifully choreographed, and is more moving to watch than we might have expected.

John Simm in a suit on a roof looking sad in Life on Mars

16Newhart

A Dream Within The Bob Newhart Show

Assatisfying sitcom finalesgo,Newhart’s dream ending bucks the trend. The age-olddeus ex machinaof a protagonist waking up from the story we’ve just watched unfold tends to be an unwelcome contrivance, but in the case of this Bob Newhart comedy, it goes down a treat.

Newhartwas actually the successor of a previous sitcom named after the comedian, and its final scene playfully references this lineage by suggesting that the show’s entire plot was a dream within the world ofThe Bob Newhart Show’s titular protagonist. In a sense, it was.

Newhart Season 8, Episode 24, “The Last Newhart”

15The Americans

Reflecting On A Hard Life

Period spy dramaThe Americansendswith a beautifully understated moment of reflection between its two chief protagonists. They imagine how life might have been for them if they hadn’t served as spies for the KGB in the United States, while gazing over their home city, Moscow, from a hilltop.

This emotive final scene reminds us of the similar wants and aspirations connecting every human being on either side of the dividing line between East and West during the Cold War. It’s as beautifully bittersweet as television gets.

Philip and Elizabeth look out at Russia

14The Fresh Prince Of Bel-Air

Leaving Bel-Air

Fresh Princereboot seriesBel-Airwill surely reference its parent show’s endingwhen it concludes its story, given how well the final scene of Will Smith’s landmark sitcom holds up. As well as the usual tearjerking goodbyes, there’s even room for one last big laugh, as Carlton unexpectedly runs down the stairs when Will switches the light off.

13MAS*H

Goodbye

Thefinale ofMAS*Hpredictably broke viewership recordswhen it first aired, and it’s easy to see why. The last shots see Alan Alda’s Hawkeye being airlifted away from the military field hospital where he’s spent most of the Korean War, and looking down to find that B.J. has spelled out the word “Goodbye” in rocks.

This ending is a final, choking reminder of the show’s emotional clout. For those who’d spent 11 years in Hawkeye’s company every week, it was almost too much to bear.

Will (Smith) looking around the empty house in The Fresh Prince of Bel Air final episode

12Six Feet Under

Given that it’s a show primarily concerned with death, it’s hardly surprising thatSix Feet Under’s finale episode is full of character deaths. But the ingenious way in which the series works the future deaths of all its main characters into a final-scene montage is something we could never have predicted.

11Derry Girls

The Troubles Are Over

Derry Girlsweaves real-life events into its storylinesfrom the very beginning, but nowhere are the show’s true-story elements more powerful than in its final scene. Accompanied by a voiceover from teenage protagonist Erin Quinn, the scene shows the British Prime Minister apologizing for Bloody Sunday, a massacre carried out by the British Army which defines Derry’s modern history.

The last shots of the comedy-drama series see its characters going to vote in an election for the first time since the Troubles began in Northern Ireland. Few TV shows have ever managed to blend hard-hitting reality with fictional comedy this seamlessly, and this final scene demonstrates exactly how it’s done best.

The goodbye message written with stones on the ground in the MASH finale, “Goodbye, Farewell and Amen.”

Everyone’s Waiting episode of six feet under with the cast gathered around a woman in a hospital bed.

Liam Neeson as Chief Constable Byers in the Derry Girls finale ending