WAUKEGAN, Ill. (STMW) — Former Waukegan High School physical education teacher and coach Brandon Brown was acquitted Thursday of having sex with one of his students in 2010 when she was 17 years old.

He had faced four to 15 years in prison on the charge, but Lake County Circuit Court Judge Daniel Shanes said following a two-day bench trial that phone and text records created a reasonable doubt as to whether the two had sex before or after the girl turned 18.

READ MORE: Englewood Shooting Injures One Man, Damages Parole Officer's Car

Both Brown, 31, and the girl, now 21, testified that they had sex in Brown’s Waukegan apartment, but the former student said it had happened during her homecoming weekend in late September 2010 and Brown said it had occurred in late October, after the student was 18 years old.

“I’m physically ill from this,” a close relative of the girl said after the verdict. “He used the school as his personal dating pool.”

The relative said the girl is strong, however, and will be fine.

Shanes clearly indicated the acquittal did not justify Brown’s actions.

“Your pursuit of her was abominable. Your conduct reprehensible,” Shanes said. “I hope you never again are allowed to coach youth sports or have interactions with teens.”

Shanes said the Constitution requires him to acquit a defendant when reasonable doubt exists, and he said phone records showed a flurry of activity around Oct. 23, 2010, when Brown said the sex occurred, followed by a sudden drop of phone or text contact, which Shanes said matched the student’s testimony that she did not contact Brown for a period of time after they had sex because she felt awkward.

Brown, who had the student in his physical education class and was also a football and girls basketball coach at the school, had been charged with one count of criminal sexual assault of a person between the age of 13 and 17, a Class 1 felony.

READ MORE: 8-Year-Old Girl Dies After Being Shot In Head In Little Village; Man Critically Wounded

He lost his job at the school after the charge was filed.

In an interview with Waukegan Police detectives in late 2012, Brown agreed that the consensual sex occurred just before homecoming, but in testimony Wednesday morning, he said he has since reviewed his phone records and concluded the two had sex on Oct. 23.

By that date, the girl had turned 18 and the charge would not apply.

Both the prosecution and defense had argued that phone and text message records backed their account of when the sex took place.

Defense attorney Alan Jones said the records raise questions about the student’s statements and her whereabouts on the evening of June 24, when the prosecution and the student said the incident occurred, raised reasonable doubt in the case.

“My client feels guilty in his heart for being a teacher and doing what he did,” Jones said in his closing arguments, but added that the evidence in the case did not support a guilty verdict for having sex with a minor between the ages of 13 and 17.

Assistant State’s Attorney Lauren Kalcheim Rothenberg said Brown took advantage of the girl and abused his position of authority as a teacher and a coach, admitted having sex with her, and changed his testimony after he learned the significance of the date in question with regard to the girl’s birthday.

MORE NEWS: Chicago Weather: Winter Weather Advisory Issued For Illinois, 1-3 Inches Of Snow Possible

(Source: Sun-Times Media Wire © Chicago Sun-Times 2014. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)