Just about every movie features a struggle between the heroes and the villains. Sometimes the line between these two sides is blurred, but most films tell a story that convinces the audiences to cheer for the good hero to overcome the evil villain. And while many movies deliver on the audience expectation that the hero will win, others reach a darker conclusion.

RELATED: 10 Villains That Deserve Their Own TV Shows (& The Actors Who Should Play Them)

It's fairly rare for mainstream films to allow the villain to win, which makes it a really shocking end to a story when it does happen. Some great films across all kinds of genres have taken this approach, and it makes for a pretty impactful finale.

Alien: Covenant (2017)

David watching over the hypersleep pods in Alien: Covenant

The Alien franchise has always been dark, with most of the on-screen characters getting killed by the deadly xenomorphs. However, they have always let the hero of the story survive to fight another day.

RELATED: 10 Scariest Aliens In Horror Movies

In Alien: Covenant, a new villain besides the aliens emerges with the android David (Michael Fassbender) who seems hellbent on breeding the aliens. After David is presumably killed by his android doppelganger Walter, the heroes defeat the aliens and escape. But in the final moments, Walter is revealed to actually be David, who plans to use the hibernating crew to breed the aliens.

Saw (2004)

Adam listens to the final tape at the end of Saw

The gruesome horror film opens with two men waking up in a basement with their legs chained to the wall and a dead man on the floor in the middle of the room. They eventually realize they are captives of the serial killer Jigsaw, who puts victims through torture tests to prove they cherish life.

After killing the man they think is Jigsaw, one of the men saws through his own foot and goes to get help. Then the dead man in the middle of the floor wakes up revealing himself to be Jigsaw. As the surviving captor screams, Jigsaw says "Game over" before closing him in the basement forever.

The Usual Suspects (1995)

A suspect smoking in The Usual Suspects

In The Usual Suspects, a disabled and timid criminal named Verbal Kint is interrogated by a detective following a bloody shootout of which he is the only survivor. Through flashbacks, we learn Verbal was part of a group of criminals forced into working for a mysterious crime lord named Keyser Söze.

The detective eventually pieces everything together and realizes Verbal's friend Keaton was Söze and used Verbal as a pawn. But after Verbal is allowed to leave, the audience sees his limp disappear. It becomes clear Verbal's entire story was a fabrication and he was Keyser Söze all along.

The Vanishing (1988)

While this film might be a little more obscure, The Vanishing is a twisted thriller worth seeking out. The Dutch film follows a man whose girlfriend goes missing while they are on holiday, and he spends years obsessing over her disappearance.

Eventually, the man is contacted by the kidnapper who tells him he will reveal what happened to his girlfriend only if the man experiences it himself. The man's obsession leads him to agree, and he even drinks a drugged tea. The movie ends with the man waking up buried alive in a coffin and the kidnapper going unpunished.

No Country For Old Men (2007)

The Coen Brothers' No Country for Old Men is largely a chase film in which a man named Llewelyn Moss is hunted by a relentless cold-blooded killer named Anton Chigurh after Moss steals drug money.

Though the movie seems to be building to the inevitable showdown between the two men, Moss is killed off-screen halfway through the story. With Moss gone, Chigurh is able to collect the money and even kills Moss' wife, making good on his threat.

Star Wars: The Empire Strikes Back (1980)

Luke's Hand is Chopped Off in Star Wars The Empire Strikes Back

The Star Wars films are perhaps the clearest stories of good versus evil, but the second film in the series dealt a shocking blow to our heroes. Throughout the movie, the heroes are separated as Luke trains with Yoda while Han and Leia try to evade the Empire.

RELATED: Star Wars: 10 Nastiest Movie Villains (Who Weren't Force-Sensitive)

In the end, Han Solo is captured by Darth Vader and frozen in carbonite. To make matters worse, Luke fights Vader and loses his hand before being told that Vader actually is his father. It is a dark and grim way to leave the story and set up the end of the trilogy.

Arlington Road (1999)

Michael Faraday (Jeff Bridges) looking outside window blinds

The underrated thriller Arlington Road stars Jeff Bridges as a man living in the suburbs who begins to suspect his neighbors are hiding a dark secret. As his suspicions grow, others begin to see him as losing touch with reality and becoming erratic following the recent death of his wife.

The man finally discovers the neighbors have planned to blow up a government building and he rushes to stop it. However, too late he realizes they used him to get the bomb inside the building. It explodes, fulfilling their plan and making it look like an innocent man was responsible.

Avengers: Infinity War (2018)

Thanos at the end of Avengers Infinity War

After being teased since Phase 1 of the MCU, the Avengers finally face off with Thanos in Avengers: Infinity War. The Mad Titan quickly proves himself to be a formidable enemy as he attempts to collect the Infinity Stones and wipe out half of the universe.

RELATED: MCU: Ranking All The Villains In Phase Three

The Avengers band together to take on Thanos and stop him from carrying out his horrible plan. However, he proves to be too much for them and with a snap of his fingers, half of the universe, including some prominent heroes, are exterminated. The film ends with Thanos smiling, satisfied at accomplishing his mission.

Se7en (1995)

Se7en - Kevin Spacey as John Doe

In David Fincher's Se7en, a brutal serial killer carries out horrific murders based on the seven deadly sins. As the killings progress, the two detectives, Somerset and Mills, find themselves no closer to stopping John Doe. However, before the last two murders are complete, Doe turns himself in.

He agrees to reveal the final two victims to the detectives based on sins "Envy" and "Wrath." Doe has a box delivered to the detectives containing the head of Mills' wife. In a rage, Mills executes John Doe, fulfilling his final two murders and completing Doe's twisted mission.

Chinatown (1974)

In one of the greatest entries into the noir genre, the classic film Chinatown stars Jack Nicholson as Jack Gittes, a private detective investigating corruption at the highest level in Los Angeles. He eventually targets the wealthy businessman Noah Cross and attempts to take him down.

Jake tries to help Cross' daughter escape her abusive father only for her to be killed instead. In the final moments, Jake finally realizes that Cross' wealth protects him and that justice for a man like that is impossible.

NEXT: 10 Best Villain Redemptions In Movies