The principal of Stuyvesant High School abruptly announced his retirement on Friday afternoon, even as New York City continued its investigation into a cheating scandal that recently rocked the elite institution.

A replacement for the principal, Stanley Teitel, who will step down on Sept. 1, will be named early next week, Education Department officials said. But Mr. Teitel’s departure comes at a critical time for Stuyvesant, among the country’s most prestigious public schools.

In June, 71 students were found to have engaged in a widespread pattern of cheating that involved using cellphones to pass along photos of test pages and share information about state Regents exams while they were taking them.

Mr. Teitel, 63, who had led the school for 13 years and worked as an educator in the city for more than four decades, did not mention the scandal in his announcement. He simply posted a brief letter on the school’s Web site, saying he wanted “time to devote my energy to my family and personal endeavors.”