The Maltese Falcon

In 1539 the Knight Templars of Malta, paid tribute to Charles V of Spain, by sending him a Golden Falcon encrusted from beak to claw with rarest jewelsâbut pirates seized the galley carrying this priceless token and the fate of the Maltese Falcon remains a mystery to this day â


â Introductory text appearing after the film's opening credits[9]
In San Francisco in 1941, private investigators Sam Spade (Humphrey Bogart) and Miles Archer (Jerome Cowan) meet prospective client Ruth Wonderly (Mary Astor). She claims to be looking for her missing sister, who is involved with a man named Floyd Thursby, whom she is to meet. After receiving a substantial retainer, Archer agrees to follow her that night and help get her sister back.
That night, Spade is awakened by a phone call from the police and is informed that Archer has been killed. He meets his friend, Police Detective Tom Polhaus (Ward Bond), at the murder scene and they determine how Miles has been murdered. He tells Polhaus he doesn't need or want to see anything else, and abruptly leaves. He tries calling Wonderly at her hotel, but she has checked out. Back at his apartment, he is grilled by Polhaus and Lieutenant Dundy (Barton MacLane), who inform him that Thursby was also murdered the same evening. Dundy suggests that Spade had the opportunity and motive to kill Thursby, who likely killed Archer, immediately after he learned of Archer's death. Archer's widow Iva (Gladys George) believes that Spade shot his partner so he could have her.


From the trailer:


Gutman and Cairo confront Spade



Spade confronts O'Shaughnessy
Later that morning, Spade meets Wonderly, now calling herself Brigid O'Shaughnessy. She explains that Thursby was her partner and probably killed Archer, but claims to have no idea who killed Thursby. Spade is not convinced, but agrees to investigate the murders.
At his office, Spade meets Joel Cairo (Peter Lorre), who first offers him $5,000 to find a "black figure of a bird," then pulls a gun on him in order to search the office. Spade manages to knock Cairo out and go through his belongings. When Cairo revives, he hires Spade. Later that evening, Spade tells O'Shaughnessy about Cairo. When Cairo shows up, it becomes clear that Spade's acquaintances know each other. Cairo becomes agitated when O'Shaughnessy reveals that the "Fat Man" is in San Francisco.
In the morning, Spade goes to Cairo's hotel, where he spots Wilmer (Elisha Cook, Jr.), a young man who had been following him earlier. He gives Wilmer a message for his boss, Kasper Gutman (Sydney Greenstreet), the "Fat Man". Spade meets Gutman, who begins to talk about the Falcon, but becomes evasive, causing Spade to storm out. Later, Wilmer takes Spade at gunpoint to see Gutman. Spade overpowers Wilmer, but meets with Gutman anyway. Gutman relates the history of the Maltese Falcon. He offers Spade $25,000 for the bird and a quarter of the proceeds from its sale. Then Spade passes out because his drink had been spiked. Wilmer, Gutman, and Cairo (who had been in the other room) depart.
When Spade awakens, he searches the suite and finds a newspaper with the arrival time of the freighter La Paloma circled. He goes to the dock, only to find the ship on fire. Later, the captain of the ship, Jacobi (Walter Huston), who had been shot several times, staggers into Spade's office before dying. The bundle he was clutching contains the Maltese Falcon.
O'Shaughnessy calls the office, giving an address and then screams before the line goes dead. Spade stashes the package at the bus terminal, then goes to the address, which turns out to be an empty lot. Spade returns home and finds O'Shaughnessy hiding in a doorway. He takes her inside and finds Gutman, Cairo, and Wilmer waiting for him, guns drawn. Gutman gives Spade $10,000 for the Falcon, but Spade tells them that part of his price is someone he can turn over to the police for the murders of Thursby, and Captain Jacobi. Spade suggests Wilmer, since he certainly killed Thursby and Jacobi. After some intense negotiation, Gutman and Cairo agree; Wilmer is knocked out in a scuffle.
Just after dawn, Spade calls his secretary, Effie Perine (Lee Patrick), to bring him the bundle. However, when Gutman inspects the black statuette, he discovers that it is a fake. During the tumult, Wilmer flees. Recovering from his frustration, Gutman invites Cairo to return with him to Istanbul to continue their quest. After they leave, Spade calls the police and tells them where to pick up the pair. Spade then angrily confronts O'Shaughnessy, telling her he knows she killed Archer to implicate Thursby, her unwanted accomplice. She confesses, but begs Spade to not turn her over to the police. But Spade, despite his feelings for her, gives her up.

Question: who had been following him earlier?
Answer: Wilmer