Bryan Siranaula, 18, of Springs, who was an East Hampton High School senior at the time, entered the plea in Suffolk County Criminal Court.

According to online court records, he admitted to first-degree forcible rape and aggravated sexual abuse, felonies; and to misdemeanor charges of criminal obstruction of breathing, acting in a manner injurious to a child under 17, third-degree assault, and criminal impersonation second degree by internet. A second rape charge was dismissed.

State Supreme Court Justice Barbara Kahn is due to sentence him on Nov. 8.

On Feb. 4, according to East Hampton Town police, Mr. Siranaula, who worked as a seasonal traffic control officer, persuaded the woman to wait for him at the school via a text message in which he pretended to be someone else. State law protects her identity.

Officials said the two had a prior relationship, but were no longer in contact.

Mr. Siranaula was accused of dragging the woman from her car in front of a 7-year-old relative who was with her. The rape allegedly took place in his Nissan. Afterward, prosecutors said during his arraignment in criminal court, he allowed her to go back to her car to comfort the child, who was watching from her car and sobbing. She told police she gave the child a video to watch and that Mr. Siranaula then forced her back to his vehicle and raped her again.

A grand jury indicted him shortly after his arrest. About 25 of his friends and relatives were in the courtroom when the indictment was unsealed, in a show of support for him. He has been free on $50,000 cash bail since Feb. 16.

While a conviction on a charge of rape in the first degree calls for a mandatory minimum sentence of five years in state prison and a maximum of 25, Mr. Siranaula could receive youthful offender status, meaning that his criminal record could be sealed.