DUBLIN (BCN) — A judge Wednesday dismissed a felony charge of obstruction of justice against a former Oakland police officer for his involvement with a teenage girl who’s at the center of a sexual misconduct scandal involving officers from multiple agencies.

Alameda County Superior Court Judge Jon Rolefson also dismissed a misdemeanor prostitution charge against Brian Bunton, 41, for allegedly having the girl, who’s the daughter of an Oakland police dispatcher, perform oral sex on him at a hotel near the Oakland airport on March 5, 2016.

Dirk Manoukian, Bunton’s lawyer, said Rolefson agreed with the defense’s position that the teen, who’s now 19, never entered into any agreement with Bunton to exchange sex for money or any other favors from the former officer.

Manoukian previously argued at Bunton’s preliminary hearing in May that Bunton never entered into a conspiracy with the teen, whose name is being omitted because she was a sexually exploited teenager.

But Judge Thomas Rogers, who presided over the May hearing, said he believed that “there was an implicit agreement” and the teen, who was 18 at the time of their sexual encounter, knew that it would be favorable for her to be involved with a police officer.

However, Judge Rolefson ruled today that prosecutors didn’t prove that Bunton had an agreement with the teen to violate the law and obstruct justice, according to Manoukian.

Rolefson found that Bunton never exchanged anything of value with the girl, Manoukian said.

The defense attorney said Bunton “has faith in the legal system,” and that faith was bolstered by Rolefson’s ruling.

Alameda County District Attorney spokeswoman Teresa Drenick said in a statement, “We are disappointed in the outcome of Wednesday’s hearing. We firmly stand behind the criminal charges that we filed and wholeheartedly believe that the evidence supports the charges.”

Drenick said, “This office has been and continues to be the leader in bringing awareness to and educating the community on the issue of sexual exploitation, especially on the fact that youth who are sexually exploited are victims of crime.”

Manoukian said the District Attorney’s Office could appeal Rolefson’s ruling or re-file the charges against him but Drenick declined to comment on her office’s plans.

Manoukian said Bunton has “admitted he made bad judgments and mistakes” in his involvement with the teen but he said he believes Bunton never engaged in criminal conduct.

At Bunton’s preliminary hearing, the girl testified that after Bunton left the hotel room where they had oral sex he sent a text message to her, advising her to stay away from International Boulevard in Oakland because there was going to be an undercover prostitution sting there.

But under cross-examination by Manoukian the teen admitted that in a later text Bunton told her that he had lied about the alleged undercover prostitution sting “just to keep you off the streets” because it was a cold night and he was concerned about her because she was the daughter of a police dispatcher.

Manoukian said Wednesday that an Oakland police lieutenant who testified at Bunton’s preliminary hearing admitted that there weren’t any prostitution sting operations on the day Bunton had oral sex with the teen.

Several other officers from Oakland and other agencies also face criminal charges for their alleged involvement with the girl.

In May, the Oakland City Council approved paying the teen nearly $1 million to settle her claim against Oakland officers, who she alleged had violated her civil rights.