A youthful arms dealer whose company once boasted a $300 million Pentagon munitions contract was sentenced Monday to four years in federal prison for trying to ship millions of rounds of prohibited Chinese-made ammunition to Afghan forces fighting alongside U.S. troops.

U.S. District Judge Joan Lenard imposed the sentence on 25-year-old Efraim Diveroli, who faced a maximum of five years behind bars after pleading guilty in 2009 to a fraud conspiracy charge. Three other executives in Diveroli's AEY Inc. are awaiting sentencing.

Lenard gave Diveroli credit for accepting responsibility for the crime but said he deserved a serious stint in prison because his scheme could have endangered U.S. military personnel and their Afghan allies. Much of the ammunition was decades old and could have been faulty.

"To participate in such a fraud when people are putting their lives on the line, that makes it so much sadder. For money," Lenard told a courtroom crowded with Diveroli family members and supporters from Miami Beach's tight-knit Jewish community, including two rabbis.

"Mr. Diveroli may have been clever, but not wise," Lenard said.

Diveroli said the sudden wealth the contract gave him at an extremely young age and the "good times" he enjoyed turned out to be hollow.

"No way it could ever be worth the suffering I have endured and my family has endured because of my actions," he said.

Lenard also imposed a $250,000 fine and ordered Diveroli and his co-defendants to pay more than $149,000 in restitution to the government.

The Pentagon contract with AEY, awarded in 2007, specifically prohibits munitions from communist China. But according to court documents, Diveroli and the others simply repackaged the Chinese ammunition — mostly 7.62mm rounds used in assault weapons like the AK-47 — so that it appeared to originate from Albania.

Between June and October 2007, court documents showed, some 90 million rounds were sent to Afghanistan in 35 shipments. In return, the Pentagon paid AEY more than $10.3 million.

The Defense Department terminated the contract in May 2008 — while Diveroli and the others were in the midst of a federal probe — issuing a new contract with another firm at a cost to taxpayers of about $40,000.

In return for Diveroli's guilty plea to the conspiracy charge, prosecutors dropped another 84 counts against him.

But his legal troubles are not over.

While out on bail awaiting sentencing in the Miami case, Diveroli was arrested in August in the Orlando area by Bureau of Alcohol, Tobacco, Firearms and Explosives agents, charged with being a convicted felon in possession of firearms.

Prosecutors in that case say Diveroli was attempting to broker another major arms and ammunition deal despite no longer having a license to do so and the Miami conviction. After pleading guilty in that case, Diveroli was ordered to forfeit several 9mm handguns and at least two semiautomatic rifles, according to court documents.

In one telephone call secretly recorded by ATF agents, Diveroli told an undercover agent posing as a potential arms buyer that "he keeps getting drawn back into this activity" despite his legal troubles.

"Once a gun runner, always a gun runner," Diveroli is quoted as saying in court papers.

Sentencing in the Orlando case is set for Jan. 25. Diveroli could get an additional 10 years in prison, but will likely get less.