11:11 AM PT -- Ryan Leaf just cut a deal with prosecutors in the case and he'll avoid jail time ... TMZ Sports has learned.
We're told Leaf showed up in court Friday and agreed to plead guilty to 1 count of misdemeanor violating the personal liberty of the accuser.
In exchange, prosecutors agreed to drop his misdemeanor battery charge.
Leaf was sentenced to four days in jail ... but he got credit for two days time served and two days credit -- so he won't have to spend any more time behind bars.
Leaf was also sentenced to 3 years of probation.
Ex-NFL quarterback Ryan Leaf has been charged with 2 misdemeanors stemming from an alleged domestic violence incident back in May, TMZ Sports has learned.
We broke the story ... the QB was arrested for misdemeanor domestic battery in Palm Springs, CA on May 22.
Details about the specific allegations are still unclear -- but what is clear, prosecutors believe Leaf committed a crime that day.
According to court records, prosecutors are moving forward with 2 charges against Leaf -- 1 count of misdemeanor battery and 1 count of violating the personal liberty of the accuser ... aka false imprisonment (also a misdemeanor).
Both charges carry a maximum 1-year jail sentence.
44-year-old Leaf was listed on his booking sheet as 6'6", 250 pounds with brown hair and blue eyes.
Of course, Leaf was the #2 overall pick in the 1998 NFL Draft -- but his career flamed out fast and his life fell apart soon after.
Leaf has been arrested multiple times for things like drug possession and burglary ... but he had sobered up and became a program ambassador for an organization that runs sober houses in multiple cities including L.A. and N.Y.
Before the arrest, Leaf had been covering college football for ESPN.