Former NFL quarterback and Heisman Trophy finalist Ryan Leaf has been sentenced to five years in prison in Texas for violating terms of his probation, though he won't serve any additional time behind bars under an agreement with prosecutors.

The former San Diego Chargers quarterback and Washington State standout violated his probation in Texas when he was arrested in Montana in 2012 after breaking into a home to steal prescription painkillers. Leaf has been serving time in Shelby, Montana, for felony burglary and criminal possession of a dangerous drug after being kicked out of a treatment program.

On Aug. 27, state District Judge John B. Board sentenced Leaf to five years in each of two drug cases stemming from his time in Texas, where he was quarterbacks coach at West Texas A&M. Board also gave him credit retroactively for time served in Montana, said Bill Kelly III, an attorney for Leaf.

The 38-year-old Leaf has served about 27 months behind bars in Montana. Randall County (Texas) District Attorney James Farren said the outcome of a Sept. 23 hearing will determine where Leaf goes next. He might have to come back to be paroled for his Texas convictions, he said.

"I'm disappointed that we ended up cutting the deal that we did," Farren said Tuesday. "But we did, and I've got to live with it. I certainly was hoping Ryan Leaf would serve time for the offenses he committed in Texas."

Leaf was accused of burglarizing a player's home in 2008 while he was coaching for the Division II school in Canyon, Texas. He resigned and an investigation turned up that Leaf had illegally obtained nearly 1,000 pain pills from area pharmacies.

He was accused of presenting an incomplete medical history to several physicians between January 2008 and September 2008 in his quest to get hold of the painkiller Hydrocodone. In 2010, he agreed to plead guilty to seven counts of obtaining a controlled substance by fraud and one count of delivery of a simulated controlled substance.

Leaf was placed on probation for 10 years under an arrangement known as deferred adjudication, meaning that if Leaf completed all the terms of his probation no conviction would be on his record. But he then got into trouble in his home state of Montana.

In May, Leaf was granted parole in Montana pending a completion of an intensive chemical dependency treatment program, which he did in August, Farren said.

Leaf spent four seasons in the NFL after being chosen No. 2 in the 1998 draft — behind Peyton Manning — by the Chargers. He retired after four dismal seasons, best known for his profane off-field outbursts toward fans, coaches and reporters. He finished his career with 14 touchdowns and 36 interceptions.