ATLANTIC CITY — Phillies outfielder Odubel Herrera and his girlfriend left Atlantic City Municipal Court hand in hand Wednesday after a domestic assault complaint against him was dropped when the 20-year-old woman declined to press charges.

Appearing before Municipal Court Judge Billie J. Moore, Herrera agreed to additional “batterer’s counseling.” He must provide proof that he has completed the counseling within 60 days, the judge said.

His girlfriend, Melany Martinez-Angulo, speaking through an interpreter and accompanied by an attorney, assured the judge that no one had pressured her to decline to press the charges.

Herrera was charged with assault on Memorial Day after his girlfriend sought out security at the Golden Nugget casino and said she had been attacked in their hotel room. The police report said “handprint markings” were found on her neck, in addition to scratches.

Moore dismissed the case but said that decision was contingent upon Herrera’s completing counseling. He and his girlfriend declined to comment outside the courtroom.

Atlantic City Prosecutor Kelley Blanchet told the judge the state had explored whether it could prosecute the assault case without Martinez’s testimony, but concluded that with no other witnesses in the hotel room, there was insufficient evidence.

Blanchet said Martinez was offered counseling and resources in both New Jersey and Pennsylvania.

“We want the court to know she was provided with additional resources both here and in Pennsylvania that she can use in the event there are any additional problems,” Blanchet said.

“Hopefully it all works out,” the judge said in dismissing the case. She said she would verify that Herrera had completed his counseling but that he would not have to appear again in court.

Herrera’s leave of absence from the Phillies was extended again by Major League Baseball on Tuesday, pending the court date.

Herrera will remain on administrative leave through at least Friday, a source said Tuesday.

In keeping with the joint domestic-violence policy negotiated between MLB and the players’ association, the commissioner’s office placed Herrera on a seven-day administrative leave after the arrest.

The commissioner’s office, which is conducting its own investigation into the incident, maintains the right to extend that leave before issuing a ruling on a potential suspension or other punishment and has now done so three times.

The Phillies are not yet privy to many details of the commissioner’s investigation, according to general manager Matt Klentak. Last week, Klentak said he believed MLB was waiting for Herrera’s next court date before making any determination. The Phillies cannot comment on the investigation, according to league rules.

Outside the Public Safety Building in Atlantic City, Herrera’s attorney, Thomas Calcagni, said: “We believe that the complete dismissal of the misdemeanor charge was the right result and Ms. Martinez and Mr. Herrera are looking forward to getting on with their lives and on with their loving relationship together.”

Staff writer Scott Lauber contributed to this article.