A former Staples High School track star who had been jailed since he threatened to detonate a bomb in a Stamford bank before fleeing with about $5,000 has been given a four-year prison term.

Just prior to sentencing Wednesday in state Superior Court in Stamford, Anthony Janssen Lewis, 28, pleaded guilty to the armed robbery of the TD Bank branch at 1625 Summer St. in Stamford on Oct. 11, 2013.

Lewis has been held at the Bridgeport Correctional Center in lieu of $50,000 bond on charges of armed robbery and third-degree larceny since his arrest a day after the robbery.

Judge Bruce Hudock sentenced Lewis to 10 years in prison, suspended after four, and put him on three years' probation. If he breaks any law while on probation, he could be made to serve part or all of the suspended sentence. While on probation, Lewis cannot visit any TD Bank branch and must submit to psychological counseling and treatment as determined by the state Department of Probation. He must also pay up to $5,000 in restitution during probation, Hudock said.

Senior Assistant State's Attorney Paul Ferencek said Lewis walked into the bank at 4:35 p.m. last Oct. 11 and passed a note to a teller that stated he had a bomb. Then Lewis told the female teller, "Give me $50,000. Hurry up. I have my finger on the trigger." As he made the threat, Ferencek said Lewis had his hand in one of his pockets. While the teller did not see a weapon, she felt threatened with physical harm and handed him about $5,000 in cash.

One Stamford police officer thought he recognized the robber from the bank's surveillance video, and Fairfield police called Stamford to report they arrested someone matching the robber's description for trespassing the night before, Ferencek said.

Following up on tips, a team of Stamford police officers went to Lewis' address in Stamford, where they saw a car in a driveway belonging to him where they said they found a large amount of currency, a black bag, the robbery note and dark clothing.

Ferencek said Lewis was cooperative with police and confessed to the robbery, saying he was having marital and money problems. He previously had no criminal record.

Ferencek said that he told police that after the robbery he took his wife to dinner in Manhattan but spent only $60.

In 2003, Lewis was the Laddie Lawrence Scholarship recipient from Staples High School, receiving $10,000 to attend a school of his choosing.