MOBILE, Alabama – A homeless man who confessed to holding up a bank in March because he was hungry pleaded guilty to bank robbery Thursday.

Federal prosecutors have agreed to recommend leniency for Timothy Patrick Herrington, 38, who admitted to robbing the Century Bank branch on Government Street on March 18.

According to court records, Herrington walked into the bank at about 1 p.m. and pointed a note at a teller stating: “Put everything in the drawer in the bag and shut up we want it all.”

Herrington told the teller to stop when she started to retrieve a bag and to stop again when she reached for more money from the drawer, the plea document states. The defendant admitted that he told the teller that the cash she had taken out was enough; he stuffed $1,238 into his pockets and met another man outside the bank.

The two went to a nearby Burger King as police cars drove by and then parted ways, according to authorities.

About an hour later, Cpl. Christopher Levy spotted a man matching the description of one of the robbers get out of a taxi on Claiborne and Canal streets. The passenger turned out to be

Justin Gorniak, who told investigators that he went with Herrington to the bank but stayed outside.

Goreniak denied involvement. He faces a robbery charge in state court but has not been charged federally.

Police tracked down Herrington at about midnight at a homeless camp behind the Rodeway Inn in Tillman’s Corner. Officers caught him at a gas station after a brief foot chase.

The plea agreement states that Herrington, who had no money on him, confessed and told investigators that he robbed the bank because he was hungry. He said he had given most of the money away.

Follow Brendan Kirby on Twitter: