San Francisco 49ers linebacker Reuben Foster has been suspended for the first two games of the 2018 NFL season for violations of both the NFL’s conduct and substance abuse policies.

Foster's previous weapons offense and a misdemeanor drug offense had already been dealt with by the court system, but the NFL hadn't yet levied its punishment. The second-year linebacker will sit out the team's first two games — at the Minnesota Vikings in Week 1 and home in Week 2 against the Detroit Lions.

Foster will be eligible to return to the team the week prior to the 49ers' Week 3 game at the Kansas City Chiefs. He will be eligible to participate in all the 49ers' preseason practices and games.

“I accept the League’s decision and am sorry that my mistakes have hurt my team," Foster said in a statement. "I have a responsibility to the 49ers, our fans and our community, and I am committed to learning from this situation and making better choices in the future. The support I have received over the last five months has been humbling, and I do not take it for granted.”

The team's general manager, John Lynch, also released a statement following the suspension.

“Our organization understands and supports the League’s decision," Lynch said. "Although we are disappointed that Reuben will not be with our team for the first two games of the season, we will continue to work with him on making better decisions and eliminating unnecessary distractions. We are encouraged to see Reuben take responsibility for his mistakes, and hopeful that he has learned from them as well.”

Foster played in 10 games as a rookie for the 49ers after the team selected him 31st overall in the 2017 NFL draft.

In May, the Tuscaloosa (Ala.) District Attorney announced a marijuana possession charge against Foster had been dismissed, following his completion of a diversion course. Foster later pleaded no contest to an assault weapon possession charge — which previously was reduced from a felony after it was discovered the gun in question had been purchased legally and no federal laws were broken. He was sentenced to two years probation, ordered to not possess firearms or ammunition during that period, given a 30-day work sentence and charged with court costs.

In a separate case, Foster previously had domestic violence and criminal threat charges against him dropped after his accuser recanted her story in court and revealed that she was “threatening Reuben" and "that [she] was going to [expletive] up his career.”