A federal judge in Nevada rejected recommendations for probation and sentenced an ex-FBI agent from New York to three months in custody for using government money he received for an undercover operation to gamble in Las Vegas.

U.S. District Judge Gloria Navarro told the former agent, Scott F. Carpenter, 40, on Wednesday that she’ll decide before he self-surrenders Nov. 18 whether he can serve his sentence in home confinement, the Las Vegas Review-Journal reported.

NY COP, ACCUSED MAFIA FAMILIES CHARGED WITH RUNNING ILLEGAL GAMBLING DENS FRONTED AS LEGITIMATE BUSINESSES

Carpenter's attorneys did not immediately respond Thursday to messages seeking comment.

Ex-FBI agent from New York was sentenced to custody after gambling government money intended for an undercover operation in Las Vegas, Nevada

Former FBI agent was sentenced to three months in custody after gambling undercover cash in a Las Vegas casino. He admitted to previously losing $13,500 of government money at the Bellagio during an undercover investigation in 2017. 

According to court documents, Carpenter admitted losing $13,500 in July 2017 playing blackjack at the Bellagio with government money that had been allocated to him and three other agents for expenses and "bribery" cash during an undercover investigation.

BORGATA SETS ATLANTIC CITY'S MONTHLY RECORD IN JULY WITH $124 MILLION IN WINNINGS

Carpenter’s lawyers provided testimonials about him, his FBI work and his U.S. Army military service in Iraq. A federal prosecutor told the judge that Carpenter self-reported misuse of the money and immediately took steps to pay it back.

But the judge said lawbreaking by federal officers "undermines the community’s trust in law enforcement," the Review-Journal reported. She also noted that Carpenter was charged with a misdemeanor rather than a felony and continued to work as an FBI agent until after he pleaded guilty in February to conversion of government money.