The ringleader, Nayeem Ahsan, referred to as “Student A” in the report, told investigators he used his iPhone to send answers to other students via text messages to “garner good will” among classmates, the report said, and perhaps get help from them in subjects he was weaker in. The number of students involved who received his texts “grew and grew,” according to Mr. Ahsan’s account in the report.

During the physics Regents exam, he told investigators, he waited until one proctor left the room and was replaced by a lax one who did not walk around. Eventually, she fell asleep, he said, and he began sending out answers. The proctor denied falling asleep.

On June 16, a student e-mailed Mr. Teitel to say that Mr. Ahsan had “electronically assisted” several students on Regents exams and was set to do so again, the report said. In reaction to that message, Mr. Teitel “showed an extreme lack of judgment,” it said. He set up a sting operation for a June 18 language exam, placing a reliable proctor to catch Mr. Ahsan in the act, the report said. When the proctor did so, he notified Mr. Teitel, who took Mr. Ahsan and his phone out of the room.

School staff members copied information from the phone to find out who else had been receiving answers. Shortly after Mr. Ahsan left, the information on his phone suddenly disappeared; he told school staff members that he had just suspended his phone service, which they did not believe, the report said.

Mr. Teitel told Mr. Ahsan and his father, “There’s no way I’m keeping him” at Stuyvesant, and told them to request a safety-related transfer to another school, which they reluctantly did, but education officials rejected it, saying his safety was not truly in jeopardy.

Dozens of students were suspended for several days and had to retake exams. Nayeem Ahsan spent his senior year at Forest Hills High School in Queens, and graduated two months ago, officials said.