Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A Texas man who plead guilty to stealing more than $1.2 million in fajitas while acting as a public servant has been sentenced to 50 years in prison.

Gilberto Escamilla, 53, was employed at the Darrel B. Hester Juvenile Detention Center in San Benito, Texas, until August 2017 — when it was discovered that he had been placing orders for fajitas using county funds and then selling them for his own profit since December 2008, according to Cameron County Court filings.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

When sentenced on Friday, Escamilla was also served with the maximum fine of $10,000 on top of the $1,251,578.72 he was ordered to pay back for the cost of the fajitas, officials said.

According to The Brownsville Herald, Escamilla's scheme unraveled last August after a delivery driver with Labatt Food Service phoned the detention center to give kitchen employees a heads up that an 800-pound delivery of fajitas had arrived.

Employees immediately thought the delivery to be suspicious as minors at the detention center are not served fajitas, however the delivery driver insisted that had been delivering fajitas to the detention center's kitchen for the past nine years.

After being fired and arrested, Escamilla's house was searched by police, who found packages of the fajitas in his refrigerator.

"It was selfish. It started small and got bigger and out of control," Escamilla said during court testimony, according to the Herald. "It got to the point where I couldn't control it anymore."

Texas State District Judge J. Manuel Banales, who handed down the sentence, dismissed an additional theft charge as part of an earlier plea deal made by Escamilla. Because Escamilla stole more than $200,000 worth of goods, Texas law considers the crime to be a first degree felony and allows for a sentencing of up to 99 years in prison. It also allows for a more severe punishment if the defendant commits a crime while acting as a public servant.

Escamilla’s attorney, Gustavo Elizondo, did not return a request from NBC News for comment.