%% ZeroContextExample entries are not allowed on wiki pages. All such entries have been commented out. Add context to the entries before uncommenting them.

The three ''Infernal Affairs'' films are incredibly twisty [[TheTriadsAndTheTongs cops vs. Triads]] films set in UsefulNotes/HongKong between 1991 and 2003. The first film, set in 2002, is based around the stories of two [[NotSoDifferent mirrored]] infiltrators. Chan Wing Yan is an undercover cop in the gang of the chubby, AffablyEvil gangster Hon Sam. Yan's handler is [[TheChessmaster Chessmaster]] senior cop Wong, who doesn't realise that his most trusted underling, Lau Kin Ming, is actually a mole planted in the police force by Sam years before. As Wong's attempts to bring Sam down reach their endgame, Yan and Ming both find their covers in danger of being blown and are both ordered by their pretended bosses to catch the "moles" who are actually themselves.

The second film is a {{Prequel}} that tells the story of how Sam rose to his position in the first film, and the unexpected roles that Yan, Ming, and Wong played in that. The third film is a sequel that follows the stories of the surviving characters from the first film, and also tells a flashback story set just before it. It introduces two new significant characters to replace the dead people: Yeung, a smooth and sinister, possibly corrupt, cop from the Security branch; and Shen, a mysterious gangster from the Chinese mainland.

Elements of all three films were streamlined into the [[ForeignRemake remake]] as ''Film/TheDeparted'', which transferred the action to Boston and made the Triad equivalents [[TheIrishMob Irish-American gangsters]] (with a bit of Irish Mob mythology about [[http://en.wikipedia.org/wiki/Whitey_Bulger Whitey Bulger]] tossed in), and won the 2006 Best Picture Oscar. In Japan, an episode aired in [=TBS=] in 2012 as a remake under the title ''Double Face - Sennyuu Sosa Hen''. It was adapted in South Korea as ''City of Damnation'' and in India as ''Homam'' in the Telugu language.

There's a TV series sequel with the same name, which takes place years after the end of the third movie.
!!The film series provides examples of:

* AffablyEvil: Sam in his good mood. Even more so in the prequel, as he was Wong's best friend.
** In the prequel, Hau is introduced as a thoughtful, melancholic and educated man. But then, [[spoiler: he kills a lot of people.]]
* AndIMustScream: In the ending of the third film, [[spoiler: Ming is left paralyzed and catatonic.]]
* BatmanGambit: A lot of them throughout the films, one example being towards the end of the first film, where [[spoiler: Yan and Lau plot Sam's demise. They make him think Keung was the mole. Since Keung knew where the hiding place for his drugs was, he is in great haste to get there and remove the drugs, taking Yan with him. With this, Yan can report the way to the hiding place to Lau, so the police can go after him and surround him. He is then shot by Lau.]]
* BecomingTheMask: Downplayed with Yan, as he was struggling to keep himself from becoming his own mask. Zig-zagged with Ming, who wants to embrace his identity as a cop, [[spoiler: even if it means indirectly causing the death of Wong and Yan and the killings of Sam and Billy to cover his past. ]]
* BeingEvilSucks: If you're a gangster, you will probably end up an utterly corrupt, friendless wreck of a human tormented by guilt over your crimes, and you'll probably die young and unpleasantly.
* BeingGoodSucks: If you're a cop, you know that society is essentially corrupt, that any gangster you manage to put away will get rapidly replaced, and that you'll probably die young and unpleasantly.
* BigBad: The first film has Hon Sam, the Triad boss ordering the infiltration. In the prequel, Hau Wing Ngai is the big bad even for Hon Sam himself.
* BilingualBonus: Dr. Lee's name is a pun on psychologist in Cantonese.
** When Wong was handing over a watch to Yan, he mentioned the pinhole camera was located at number 5, reflecting Yan's birthday and his status as an undercover. [[note]]'''二五仔''' (Jyutping: ji6 ng5 zai2) was the term in question, which means snitch in English. This slang is only used in Cantonese language.[[/note]]
** While filling out their personal information, Keung asked Yan about the second letter of the word ''bodyguard'' in Chinese. Yan almost got the right letter, only to made a mistake afterwards. Doubles as a funny moment.
%%* BlackAndGrayMorality: Especially in the second and third films.
* BrokenPedestal: Wong fell out with Sam after the events of the second film, establishing their rivalry. Sam even foreshadows this in the beginning, while he was dining with Wong in police station.
* CharacterTics: Both Yan's tic of tapping his fingers on things, and Ming's of tapping objects he's carrying against his leg as he walks, are plot points.
* ChekhovsGun: The [[spoiler:envelope]] handed by Sam to Ming, Yan recognized it judging by the handwriting he left on it.
* TheChessmaster: Most of the main characters, most notably Wong, Sam, Sam's wife Mary, Ming, Yan, Hau, and Shen and Yeung as a duo.
%%* CloudCuckooLander: Keung has shades of this.
* CoolShades: Shen and Wong.
%%* CowboyCop
* DarkAndTroubledPast: Ming is constantly struggling with his double identity as Sam's mole while he attempts to embrace his identity as a police.
** Yan was an illegitimate son of Ngai Kwun, a triad boss and father of Ngai Wing-hau. Despite being estranged, Yan's tie to him almost got him expelled from the police academy for real until Wong offered Yan a second chance.
* DeathIsDramatic: Whenever a major character is killed off, a flashback sequence of the killed character is played along with a melancholic background music.
* DestinationDefenestration: [[spoiler: Superintendent Wong gets thrown off the rooftop by Sam's goons after he refused to compromise Yan's identity.]]
* DetectiveMole: Ming was tasked by Wong to find out the mole within the police force, which also happens to be himself.
* DirtyCop: Ming and [[spoiler: Billy]] as they're both Sam's mole in police force. Yeung was suspected to be one of this due to his tactics and his connection with Shen, a mainland gangster. Turns out [[spoiler: Shen is an undercover cop working for the mainland government and is cooperating with Yeung to expose Ming's real identity.]]
* DrivenToSuicide: In third film, [[spoiler: after Ming inadvertently revealed himself as Sam's mole, he snapped and killed Yeung before gets wounded by Shen. Ming then attempts suicide by shooting himself through his lower jaw, too bad the bullet doesn't deliver the fatal blow.]]
* EverythingsLouderWithBagpipes: Played at cop funerals.
* ExternalCombustion: [[spoiler: Superintendent Luk died to a car bomb set by Ngai, which was intended for Wong as a revenge for his role in his father's murder.]]
* GambitPileup: All three films, but especially the plotting in the second film involving Wong, Sam, Sam's wife Mary, and Ngai Wing-Hau.
* GenreShift: The first two films are gangster movies, the third is a MindScrew psychological horror.
* GreyAndGrayMorality: The main theme of the whole series, but especially evident in the prequel. On one hand you have a cop [[spoiler: masterminding a mob boss' murder]] and on the other you have the son of the mob boss attempting to go legit.
%%* GoingNative
* HeelFaceTurn: A lot of them by several characters throughout the trilogy. The most notable is in the first film: [[spoiler: After Wong's death, Lau decides that he doesn't want to serve Sam any longer. He confederates with Yan to stalemate Sam and kill him, hoping he will be able to leave his past as a gangster mole behind and fully become a cop.]]
* HereWeGoAgain: The third film ends with a flashback to the period of the first film that finishes with Yan and Ming unknowingly meeting each other in a hi-fi store - the scene that began the main action of the first film after an establishing pre-credit sequence.
* HeroicBSOD: In the first film, Yan experienced one [[spoiler: after witnessing Wong landed on the taxi he just got off.]]
* HiddenWire: Ngai found this in his half-brother, Yan's jacket [[spoiler: in his dying moment.]]
* HiredToHuntYourself: In the first film, both Yan and Ming are ordered by their apparent boss to find the mole in their team, while actually being that person.
%%* IKnowYouKnowIKnow
* IfICantHaveYou: [[spoiler: Ming sold the first Mary out to the Ngais when she refused to return his romantic affections.]]
%%* InternalAffairs
%%* KansasCityShuffle
* KillItWithFire: Man-cheng, one of Ngai's capo in the prequel was dealt with this way.
%%* LadyMacbeth: Sam's wife Mary.
* LikesOlderWomen: [[spoiler: A younger Ming towards the first Mary, Sam's wife.]]
* LookBothWays: [[spoiler: Sam's wife, Mary was ran over by Ngai's gangsters at the airport after Ming betrayed her.]]
* MexicanStandoff: In the perhaps most famous scene of the series, Yan has Lau at gunpoint while [[spoiler: Billy]] threatens Yan likewise.
** There is also a similar situation at the end of the prequel where [[spoiler: Hau threatens Sam with a gun and at the same moment Wong does the same to him]].
%%* MindScrew
%%* MobWar
* TheMole: The two leads are the most obvious example. [[spoiler: Shen is an undercover cop, and Billy acts as a mole for the triads.]]
* MyGreatestFailure: In the beginning of the second film, Wong tells Sam how he failed to save his partner from being impaled by a gangster during his junior year.
* NapoleonDelusion: [[spoiler: In the third film, Ming turns out to have gone insane and believe that he is now Yan.]]
* NoGoodDeedGoesUnpunished: Invoked by the story of Wong told to Sam in second film, where he tried to stop a gang fight as a junior cop with his partner. His partner was mortally wounded by a gangster and Wong wounded and arrested the assailant in return. Wong encountered the said gangster nine years later, boozing with Ngai's gang members, as if he faced no consequences for his crime. Wong remarked the incident with a fitting proverb while voiced his regret for not emptying his gun in the gangster's face.
* NoMrBondIExpectYouToDine: In a morally-inverted example, Wong likes doing this to Sam whenever he's arrested.
* NotSoDifferent: The scene with Lau and Yan sitting in front of the hi-fi stereo listening to the same song and both visibly feeling a sense of community - without knowing that they're actually each other's worst enemies, of course.
* OhCrap: Wong, when Del Piero manages to halt the elevator he's in.
** Sam in several instances, most notably him realizing that [[spoiler: Lau is no longer on his side and has him cornered, just before he gets shot by him.]]
* OneSteveLimit: Exception with the two Marys.
%%* OutGambitted
* OutWithABang: In the second film, Ngai's capo Gandhi is suffocated with a plastic bag by a female assassin while having sex with her.
* TheCuckooLanderWasRight: All through the three films, Keung has always been the one to point out undercover cops. A few times, he has also made throwaway comments pointing to Yan as a cop.
* ThePurge: The massacre of Ngai's lieutenants in the second film, [[spoiler: and Ngai's family near the end of the movie.]]
* ThoseTwoGuys: Del Piero and Keung are usually seen with each other in the scenes they appeared in the first movie.
* RedemptionRejection: [[spoiler: Lau doesn't want to be a gangster anymore, but the crimes of his past are not forgiven. Even as he manages to kill Sam in hope to erase all evidence that he worked for the triad, Yan finds the cassette that clearly proves that Lau has worked for Sam. That leads to Yan trying to arrest Lau, which in turn leads to Yan being killed by Inspector B. Yan's death then is the reason for the things happening in the third film, leading to Lau being defeated by Yeung and Cheng.]]
%%* ReverseMole
* RevisedEnding: The mainland China version of the first film ended with a different ending in which [[spoiler: Ming gets caught]], because of government MoralGuardians.
* RooftopConfrontation: Yan and Ming after they learn of each other's identity.
%%* RoomFullOfCrazy
%%* TheShrink: Yan's therapist Dr. Lee.
* ShootTheHostageTaker: [[spoiler: Billy shot Yan in the head while the latter was holding Ming at the gunpoint, before Billy revealed himself as another Sam's mole to Ming.]]
** Happened in the prequel too, this time with [[spoiler: Wong shooting Hau while the latter was grabbing Sam.]]
* SinisterShades: Wong has them most of the time. Also Shen in the third film.
%%* SunglassesAtNight: Shen (and all the other sunglasses tropes on this page)
* SurvivorGuilt: Ming undergoes this following the events of the first film, which also [[spoiler: drove him insane.]]
* [[SwitchToEnglish Switch To Mandarin]]: Asked by Shen during his meeting with [[spoiler: Yan and Yeung]] when they speak in Cantonese. [[RealityEnsues Reality ensues]] as Mandarin is the official language of mainland China and Shen comes from there.
* TheScapegoat: Billy. Ming pins everything on him at the beginning of the third film.
* ThroughTheEyesOfMadness: [[spoiler: Most of the third film.]]
* {{Unperson}}: [[spoiler: Ming erases Yan's police file after Yan discovered Ming's double identity as Sam's mole.]]
* VillainProtagonist: Lau Kin Ming for the whole series.
* WouldHurtAChild: [[spoiler: Sam ordered his Thai partner to dispose all of Ngai's remaining family member, including his kids.]]
%%* XanatosSpeedChess