A man who was working as an Army recruiter at Tooele High School last year when he had sex with a 17-year-old female student has been sentenced to jail time and probation.

Brian Joseph Dragon, 33, of Herriman, was charged in 3rd District Court with three counts of first-degree felony rape, which is punishable by up to life in prison.

Dragon pleaded guilty in July to two lesser counts of third-degree felony unlawful sexual activity with a minor, admitting he had sexual intercourse with the girl twice in October 2016, according to court documents.

Judge Robert Adkins on Tuesday sentenced him to 29 days in jail as part of a 36-month probation. Dragon also must serve 60 days of home confinement and complete sex-offender treatment.

The girl reported the sexual encounters to police in December after a male student told school administrators about “suspicious behavior” he witnessed between the girl and the recruiter, according to a news release from Tooele City police.

A probable cause statement filed in court says the behavior included spending time with the student in a portable classroom on school property with the doors locked and windows covered.

The girl later told police that she and Dragon had been alone on several occasions in the portable classroom, where he had touched her breasts and they had sexual intercourse three times.

Charging documents say the encounters occurred between Oct. 1 and Dec. 3 of last year. Dragon had been working as a military recruiter at the school since August 2016, said Tooele County School District spokeswoman Marie Denson.

He was not employed by the district, but worked at the high school through a partnership with the Army as a “Students Taking Active Roles”instructor.

Utah Army spokesman Jeff Ross has said that Dragon had been working as a recruiter since November 2014, following two combat tours as an infantryman, including one in Afghanistan.

The recruiting position, based at a center in West Valley City, was supposed to be a three-year break from combat, allowing Dragon to return to the field in late 2017.

Ross said in December that Dragon had been taken off recruiting and placed in an administrative role.

It was unclear Friday what Dragon’s employment status was, as Army officials in Kentucky could not be reached for comment.