Mark Christopher Yantsos was charged with a sex offense involving a 17-year-old girl at Richard Montgomery High School in Rockville, Md. (Courtesy of Montgomery County Police)

The head of security at Richard Montgomery High School in Rockville befriended a 17-year-old student, gave her gifts at school and arranged to meet her in a hotel room late at night where they had sex, according to court documents filed Thursday that charge him with sex abuse of a minor and a fourth-degree ­sex offense.

Mark Christopher Yantsos, 57, of Rockville was arrested Thursday by Montgomery County ­police.

The police said the school system placed Yantsos on administrative leave as soon as it learned of the allegations, which were brought to officials’ attention through the student’s mother.

One of the charges Yantsos faces is being in a supervisory position and having sex with a minor who was enrolled at a school where he worked. He has worked in the school system for a decade, according to the district.

Yantsos was jailed Thursday morning and held on $75,000 bond, according to court records. The records do not indicate whether he has retained an ­attorney.

Richard Montgomery’s principal, Damon Monteleone, described the allegations as “despicable” in a letter home to parents, saying that such actions reflect “an irreparable breach of trust, ethics and the law.”

“We do not and will not tolerate this behavior in our school,” he wrote.

Detectives said in arrest files that the teenager told police Yantsos befriended her in April 2016. Over time, Yantsos allegedly gave her gifts, including cash, a diamond pendant necklace for Christmas, a pair of Ugg boots, a North Face jacket and a ring for Valentine’s Day. The victim told detectives that at first she viewed him as a “close friend and confidant,” according to charging ­documents.

By October, police said, the relationship “began to intensify,” according to court documents, and Yantsos started to tell her that he “loved her” and that “he wanted the two of them to be together.”

In March, police said he bought the student an iPhone 7 so they could communicate during and after school and that the phone contained “inappropriate text messages” that Yantsos sent to the girl.

On March 3, the student said, Yantsos picked her up at her home, drove to a Rockville hotel where they had sex, and then took her home, according to the account in the police charging ­documents.

According to court documents, the student said that she and Yantsos had “discussed and agreed earlier that they would have sexual relations” at the hotel room. Detectives said she told them that she and Yantsos had been together on several other occasions and kissed but did not have “sexual contact.”

The teenager’s mother found out about the ongoing relationship April 3 and went to the high school to report it, according to charging documents.

Police allege Yantsos saw the student’s mother enter the school and contacted the student to leave class and meet him, and return the iPhone he had given her.

An initial investigation said police found “screen shots of sexually explicit text messages” between the teen and Yantsos, love letters and photos of the student and the security team leader — in uniform during the school day — spending time together at school.

Monteleone said school officials had fully cooperated with authorities and that counselors and psychologists would work at the school as needed to help ­students.

“Providing our students with a safe learning environment is our top priority,” he said.

Yantsos started with the Montgomery County school system in 2007, district officials said, working in security at Ridgeview Middle School before moving to Richard Montgomery a year later. At Richard Montgomery, he worked in security for nine years and was also the varsity girls’ basketball coach for two seasons, starting in the 2012-2013 school year. He has been the security team leader at Richard Montgomery since 2008.

Montgomery County Schools Superintendent Jack Smith also issued a statement after the arrest of Yantsos, calling the allegations disturbing. “Any adult who abuses their position and takes advantage of our students has no place in our schools or community,” he wrote.

Smith said it had recently come to the attention of school officials that in 1994 Yantsos was accused of using a revolver to menace a woman while he was working for the New York Police Department. Yantsos passed a criminal-background check when he was hired with the school system, said schools spokesman Derek Turner.

Smith noted in his statement that the school system — Maryland’s largest — updated its practices and procedures related to child abuse in 2015. The overhaul included improved training in recognizing and reporting abuse and a new employee code of conduct, he said.