Batman finds the Joker by using a sonar device that spies on the entire city, with the reluctant help of Lucius Fox.
Both the civilians and the prisoners refuse to kill each other, while Batman apprehends the Joker after a brief fight.
After announcing Gotham will be subject to his rule come nightfall, the Joker rigs two evacuating ferries with explosives; one containing civilians and the other containing prisoners.
He says that he will blow them both up by midnight, but will let one live if its passengers (who have been supplied the trigger to the other boat's explosives) blow up the other.
In the film, Bruce Wayne/Batman (Bale), Police Lieutenant James Gordon (Oldman) and District Attorney Harvey Dent (Eckhart) form an alliance to dismantle organized crime in Gotham City, but are menaced by a criminal mastermind known as the Joker (Ledger) who seeks to undermine Batman's influence and create chaos.
Nolan's inspiration for the film was the Joker's comic book debut in 1940, the 1988 graphic novel The Killing Joke, and the 1996 series The Long Halloween, which retold Two-Face's origin.
Bruce Wayne is impressed with Dent's idealism and offers to support his career; he believes that, with Dent as Gotham's protector, he can give up being Batman and lead a normal life with Rachel Dawes—even though she and Dent are dating.
Batman arrives at the building, but realizes that the Joker sent him to Dent's location instead.
Gordon orders the evacuation of all the hospitals in Gotham and goes to secure Reese.
The Joker convinces Dent to seek revenge for Rachel's death.
Batman persuades Gordon to preserve Dent's heroic image by holding Batman responsible for the killing spree.
As the police launch a manhunt for Batman, Gordon destroys the Bat-signal, Fox watches as the sonar device self-destructs, and Alfred Pennyworth burns a letter from Rachel saying she planned to marry Dent.