A domestic assault charge against Houston Astros closer Roberto Osuna in Toronto was withdrawn on Tuesday.

In exchange, the Astros pitcher agreed to a peace bond, which requires him to not contact the woman he is alleged to have assaulted and to continue counseling.

He must comply with the conditions of the bond for one year or face criminal charges, which would carry a maximum sentence of up to four years’ imprisonment.

Osuna nodded when Judge Melvyn asked if he understood the agreement.

“I am pleased and relieved by today’s court decision,” Osuna said. “Now I can begin to put these allegations behind me and focus on baseball. I want to thank my family, teammates and fans for believing in me. I am grateful to the Astros for providing me with the opportunity to play baseball and compete for a World Series championship.

Osuna was greeted by boos Monday when he entered in the ninth inning in the Astros’ win over the Blue Jays, the first time he had returned to the Rogers Centre since being traded.

The 23-year-old Osuna, then a member of the Toronto Blue Jays, was charged in May with assault in an alleged domestic incident.

Pretty good deal all things considered…