SANTA CLARA, Calif. -- San Francisco 49ers linebacker Reuben Foster got resolution to the last of the offseason charges against him Wednesday but could still face punishment from the NFL for his legal troubles, sources, tell ESPN.

League sources told ESPN's Adam Schefter on Wednesday that the league is still mulling a potential multigame suspension for Foster. That possibility looms as Foster's offseason issues are examined under the league's personal conduct policy and its policy on substance abuse.

As Foster went through the legal process for two offseason arrests, the NFL continued to say it was closely monitoring his situation, leaving open the possibility for a possible punishment.

On Wednesday, Foster pleaded no contest to a misdemeanor charge related to possession of an illegal weapon, stemming from a Feb. 11 incident in Los Gatos, California.

Foster was sentenced to 232 hours of community service and two years of probation in which he is barred from the possession of any guns or ammunition. He also must pay $235 in total fines and surrender the weapon that brought the charge, a SIG Sauer 516.

Foster's plea brought to an end a tumultuous offseason in which he at one time faced four charges, three of which were originally charged as felonies.

Soon after the season, Foster was arrested twice in the span of about a month: once in January in Tuscaloosa, Alabama, for possession of marijuana, a misdemeanor and another in Los Gatos, which involved two charges related to domestic violence and the weapons charge.

Wednesday's plea brought resolution to the most serious of those two arrests as it was the final charge remaining from his Feb. 11 arrest in Los Gatos.

Elissa Ennis, Foster's former girlfriend, initially accused Foster of domestic violence before she recanted her story a couple of days after her initial complaint. She then testified under oath at the preliminary hearing on May 17 that she lied about Foster hitting her and that the injuries she showed to authorities were the result of a fight she was in on the night of Feb. 10.

Judge Nona L. Klippen dismissed the two charges related to domestic violence on May 23, citing a lack of evidence against Foster. On that same day, Klippen reduced the weapons charge to a misdemeanor on the basis that the weapon had been purchased legally in Alabama, and though it wasn't legal in California, it hadn't been used to commit a crime.

Prosecutors argued that the weapons charge should remain a felony because Foster had stored it in an unsafe manner. It was found fully loaded and capable of firing up to 31 bullets while sitting on the floor of a bathroom in his basement.

The marijuana charge Foster faced in Alabama was also dismissed on May 25 after he completed a diversion course and was asked to pay a $100 bail bond fee.

Foster entered the league as a first-round pick in 2017 after he failed a drug test at the NFL scouting combine when his urine sample was found to be diluted. That, in addition to his offseason legal issues, could factor in to any potential league punishment.