SAN FRANCISCO -- San Francisco 49ers linebacker Aldon Smith pleaded no contest Wednesday to three felony weapons charges and two misdemeanor counts of driving under the influence.

The 24-year-old Smith entered his pleas in a Santa Clara County Superior Courtroom in San Jose. He faces a sentence ranging from spending no time in custody to a maximum of four years and four months behind bars at a judge's discretion, prosecutors said.

Smith is scheduled to be sentenced on July 25 -- two days after the 49ers are to open training camp in Santa Clara.

Aldon Smith pleaded no contest to three felony counts of possessing illegal assault rifles and misdemeanor DUI on Wednesday. AP Photo/Scott Boehm

"Mr. Smith has now accepted responsibility and has pleaded to all of the charges," Santa Clara County District Attorney Jeff Rosen said.

"We are aware that Aldon entered a plea today in a case that we have closely monitored," 49ers general manager Trent Baalke said in a statement Wednesday. "Today was an important step towards bringing that situation to a resolution."

Smith's lawyer, Joshua M. Bentley, released a statement, saying his client "has never wavered from his commitment to do the right thing in this case."

Smith "has accepted and continues to accept responsibility for his actions. We are looking forward to the next court appearance and are confident that the court will reach an appropriate sentence," the statement read.

In November, Smith pleaded not guilty to three felony counts of illegal possession of an assault weapon after deputies said they found three assault rifles while responding to a complaint about a party in June 2012 at Smith's home. During the party, Smith fired a handgun in the air and was stabbed as two other people were shot during a melee, authorities said.

While the three rifles were legally bought in Arizona, Santa Clara County prosecutors say the weapons are illegal in California.

The DUI charges were filed after Smith's car smashed into a tree in San Jose in September as police said his blood-alcohol level was twice the legal limit.

A fearsome pass-rusher, Smith took a five-game leave of absence from the 49ers to undergo treatment for substance abuse last season. He finished the 2013 regular season with 8½ sacks and 34 tackles in 11 games with eight starts after having a franchise-record 19½ sacks in 2012.

In January, Smith said during an interview with The Associated Press he was encouraged by the strides he had made to better himself off the football field that put life -- and his work -- in perspective.

But last month Smith was arrested at the Los Angeles International Airport after authorities said he became belligerent during a security screening and threatened that he had a bomb.

The Los Angeles District Attorney's office said Smith wouldn't be charged with a felony, but city attorneys who handle misdemeanors are still investigating. Smith has not commented on the incident.