Two fired Metro employees who admitted to stealing about $500,000 in cash from fare machines were sentenced to prison terms Friday in federal court in Virginia.

John V. Haile, 54, of Woodbridge, a Metro Transit Police officer, was sentenced to 37 months in prison. Horace D. McDade, 58, of Bowie, a revenue technician, received a 30-month sentence.

The pair, who pleaded guilty in March to the thefts, stole the money and hid it in the brush beneath an underpass in a hotel parking lot, then came to collect the bags of coins and bills when their shifts were done, prosecutors said. Authorities said the stolen money was laundered through purchases of Virginia lottery tickets and cash purchases from home-improvement stores.

“These men were on the front lines of securing Metro’s fares, and they brazenly abused their positions — shift after shift, year after year — to steal half a million dollars from Metro and local taxpayers,” Neil MacBride, U.S. Attorney for the Eastern District of Virginia, said in a statement.

During the sentencing hearing in federal court in Alexandria, both men apologized for what they had done.

Haile, who had been hired by Metro Transit police in 1997 and was responsible for providing security as money was transported to and from the system’s revenue collection facility in Alexandria, told the court he had the “deepest sorrow.”

“I have always considered myself a strong, well-minded individual, but I fell into a hole, and that caused me to lose my most cherished thing — trust,” Haile said.

Haile’s attorney said his client had a gambling addiction, and Haile admitted that he spent thousands in stolen money on lottery tickets. Prosecutors said he frequently visited convenience stores to buy the tickets and often paid with bags of coins.

McDade, who had worked for metro since 1979 and was assigned to service broken fare-box machines, told the judge “this type of action is so uncharacteristic of me.”