After criminal Frankie Faulkner unsuccessfully tries to blackmail honest district attorney Joseph Foster into allowing indicted crime boss Hansen to go free, Joseph convinces juvenile delinquent Larry Price to join the boys' club, of which he is a sponsor. Joseph vows to Rev. Thomas Garfield, who runs the club, that he would "sell his soul" to convict Hansen, and later he is summoned by a stranger, Nick Beal, to a disreputable wharfside café known as the China Coast. The seemingly omniscient and immaculately dressed Nick gives Hansen's account books, which purportedly had been burned, to Joseph, who is unaware that Nick is actually the Devil. Joseph, who considers himself incorruptible, reluctantly accepts the books because of his overwhelming desire to convict Hansen. After Hansen is convicted, Joseph confesses to his steadfast wife Martha that he stole the books, and she urges him to remain honest. That night, a committee of Joseph's friends, which includes Judge Hobson, Rev. Garfield and Paul Norton, seek to nominate Joseph for governor. Joseph is flattered by their confidence, but becomes troubled when Nick mysteriously appears in his library with a $25,000 check for his campaign. Despite Martha's protests, Joseph keeps the check, adding Nick to his growing list of debts. That night outside the café, Nick coaxes prostitute Donna Allen into working for him by providing her with a luxurious apartment and clothes. Donna soon appears at the boys' club posing as a benefactor, and later works on Joseph's gubernatorial campaign. Under Nick's influence, Joseph changes into a vain, selfish and greedy politician. Now completely indebted to Nick, Joseph accepts a pact with Faulkner to get himself elected, then becomes estranged from Martha when she suggests that it would be worth losing the governorship to preserve his integrity. Nick coaches Donna on how to seduce Joseph, but when everything occurs exactly as Nick had outlined, she becomes unnerved and tries to leave town, but is stopped by Nick. Although Joseph wins the election, his disappointed friends renounce their connection with him after learning about his deal with Faulkner. Only Rev. Garfield remains supportive, and reveals to Joseph his suspicions that Nick is the devil Lucifer. Joseph then attempts to reunite with Martha, who offers to sell their home in order to repay Nick. Nick, however, materializes with news that Hansen's bookkeeper, Finch, who had recently come to see Joseph, has been murdered. After Joseph is implicated in the murder because one of his pipes is found on Finch's body, Nick offers to help Joseph clear his name if he signs a contract giving Nick the state seal. If he refuses, Nick will send Joseph to the island of Armus Pardidas. Joseph seems to acquiesce when he allows Nick to help him evade inquisitive police, but after Joseph is inaugurated, he publicly admits to fraud and resigns from the governorship. Nick reminds Joseph about the forfeit clause in his contract, and arranges to meet him at the café that night. Before going, Joseph confides in Rev. Garfield, who is unable to find any island named Armus Pardidas on a map, and postulates that it is the island of lost souls. He then insists that because Joseph has expiated his sins by renouncing the governorship, he is no longer answerable to Nick's contract, and urges Joseph to return to his wife. Nick commandeers Joseph's taxi, however, and drives him to the wharf. Martha and Rev. Garfield follow them, and when Nick allows the reverend to inspect the contract, Rev. Garfield drops his Bible on top of it. Joseph then tucks the contract inside the Bible, and Nick, unable to withstand the power of God, backs off and disappears into the fog. Having won his battle with Lucifer, Joseph reunites with Martha.