Judge Nona Klippen said prosecutors didn't meet the burden of probable cause on charges of felony domestic violence and forcefully attempting to dissuade a witness.
Foster was also charged with felony possession of an assault weapon after officers found a Sig Sauer 516 short-barreled rifle in his home while investigating his ex-girlfriend's domestic violence report. That charge was reduced to a misdemeanor.
The 49ers have not allowed Foster to take part in the offseason program while he dealt with these charges and general manager John Lynch had said he would be cut from the team if it was determined that he hit a woman. Foster will be allowed back Thursday now that the domestic violence charges have been dropped.
"It has been made clear to Reuben that his place on this team is one that must continue to be earned," Lynch said. "We will continue to monitor the remaining misdemeanor charge."
The prosecutor's office released a statement expressing disappointment in the judge's decision.
"We are disappointed because the evidence demonstrated that Mr. Foster seriously hurt his girlfriend," the statement said. "Some have wondered why we still think Mr. Foster hurt his girlfriend when she said that he didn't. Recantation is common among domestic violence victims. Some are scared, some feel guilty, some are coerced, some need money. Whatever the cause, we move forward on cases when victims falsely recant because we know that if we don't more victims will be hurt."
The accuser, Elissa Ennis, recanted her accusations two days after telling police she was hit in the head eight to 10 times by Foster. She testified at a preliminary hearing last week that the injuries were caused by a fight with another woman and she gave prosecutors video of that fight. She said she lied initially because she wanted retribution after Foster tried to end their relationship.
Klippen said recantations aren't uncommon in domestic violence cases but said there was no supporting evidence in this case that Foster had attacked Ennis.
"The injuries appear more consistent with a fight with another woman on a street than with being hit in the head by this defendant," Klippen said while ruling from the bench.
Klippen also pointed to the fact that Ennis appeared "unusually calm" while making a second 911 call reporting the incident. A bystander who gave her a phone to make the call testified she wasn't frantic and didn't appear to have serious injuries, and there was no evidence of prior abuse. Ennis also testified that she had made false allegations in another case after a boyfriend broke up with her.
Prosecutor Kevin Smith had no comment while leaving the courthouse after the ruling and Foster only gave a thumbs-up before getting into a car with his attorney.
The 49ers drafted Foster 31st overall last year after questions about his health and character caused him to drop from being a possible top 10 pick.
Foster delivered on the field, ranking second on the team with 72 tackles in 10 games as a rookie and looking like a key part of San Francisco's defensive future.
"I'm excited to get him back, give him a hug and move forward," left tackle Joe Staley said.
Foster was charged in January in Alabama with second-degree marijuana possession before the incident in February that led to this case. Foster is due in court next month for a hearing in his marijuana case.
NFL spokesman Brian McCarthy said the league will "continue to monitor all developments in the matter which remains under review."
For more NFL coverage: http://www.pro32.ap.org and http://www.twitter.com/AP_NFL
Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.