SANTA CLARA, Calif. -- San Francisco 49ers linebacker Aldon Smith was charged Wednesday with three felony counts of illegal possession of an assault weapon in a case stemming from a party at his home in June 2012.

The Santa Clara County district attorney's office said in announcing the charges that Smith, 24, is expected to surrender later this month. He is on an indefinite leave of absence from the defending NFC champion 49ers while undergoing treatment for substance abuse at an in-patient facility following a DUI arrest Sept. 20.

"We've been aware of the incident, the serious nature of it. We're all accountable for our actions, good and bad," 49ers coach Jim Harbaugh said Wednesday. "There's a process, due process, that will take place. I don't feel any need to comment further on it."

When asked whether Smith -- who set a franchise record with 19.5 sacks last season -- would play again this season, Harbaugh said only, "I don't have any need to further comment on it."

On Monday, the coach said he had traded a few text messages with Smith, saying, "Heard that things are going very well, very positive reports back."

If convicted, Smith could face up to four years and four months in jail, the district attorney's office said.

"The preamble to the assault weapons law states that each assault weapon 'has such a high rate of fire and capacity for firepower that its function as a legitimate sports or recreational firearm is substantially outweighed by the danger that it can be used to kill and injure human beings,'" District Attorney Jeff Rosen said. "California's prohibition of these powerful weapons is not about hunting or target practice. It is about interrupting the long history of death, carnage and grief assault weapons have inflicted on California communities."

Smith also is likely to face a suspension from the NFL, perhaps pushed back to next season or after his legal issues are resolved.

"The 49ers organization is aware of the recent developments with Aldon arising from an incident at his home in 2012," the team said in a statement Wednesday. "We recognize the serious nature of this situation, as does Aldon, and will continue to monitor it closely. As this is an ongoing legal matter, we will have no further comment."

Last month, Smith and former teammate Delanie Walker were named in a lawsuit filed in Santa Clara County Superior Court by a Northern California man who said he was shot at a party at Smith's house on June 29, 2012.

Aldon Smith has been charged with three felony counts of illegal possession of an assault weapon, stemming from a party at his home in June 2012. Jeff Gross/Getty Images

The players charged a $10 admission and $5 per drink, the lawsuit said. Smith and now-Tennessee Titans tight end Walker, 29, were allegedly intoxicated when they fired gunshots into the air off a balcony while trying to end the party, the lawsuit said.

Walker will not be charged, deputy district attorney Brian Buckelew told The (Nashville) Tennessean.

"Delanie Walker did not shoot one of the assault weapons. Delanie Walker did shoot a handgun, and that was after gang members had already started shooting at Aldon's garage," Buckelew told the newspaper. "So the purpose of Delanie Walker shooting up in the air was to try and get the gang members out of there. It could be viewed as self-defense, or a reasonable means to try and dissipate a crazy situation."

Before the 49ers' 2012 home opener last September, Smith was a passenger in a car during an accident in Santa Clara County in which the driver swerved to avoid hitting a deer. Smith sustained a cut beneath his right eyebrow. He apologized and insisted he had grown up.

Smith, selected seventh overall in the 2011 draft out of Missouri, had previously been arrested on suspicion of DUI in January 2012 in Miami shortly after the 49ers lost in the NFC title game.

He is on the reserve non-football injury list while in rehab, and there is no NFL minimum for number of games he must miss while on the list.

Smith played in a 27-7 home loss to the Indianapolis Colts on Sept. 22 and had five tackles just two days after he was arrested and jailed on suspicion of DUI. Smith apologized for his behavior after the game.

Information from The Associated Press was used in this report.