The principal of Stuyvesant, one of New York City’s most sought-after high schools, won’t be leaving his post after all.

Eric Contreras, who has been at the helm of the specialized high school for two years, announced on August 27 that he would be stepping down to take a job as senior executive director overseeing teacher training and curriculum within the education department. In a letter addressed to the “Stuyvesant Community,” he described the move “as a very difficult one” and said he’d remain principal until an interim acting principal was named.

But on Friday, just days after the new school year kicked off, Contreras told parents and students that he changed his mind.

“After careful consideration, I have decided to stay at Stuyvesant High School and continue supporting and leading this amazing community,” he said in an emailed statement. “It was a personal decision, and I deeply believe that my place is in a school working directly with children every day.”

It was not immediately clear whether Contreras’ change of heart — or his short-lived decision to step down — is related to Mayor Bill de Blasio’s proposal to overhaul the admissions process at Stuyvesant and seven other high schools that admit students based on a single exam.

Those admissions changes have sparked a fierce backlash, including from Stuyvesant’s own alumni association. After Contreras announced his intention to step down, speculation swirled that the well-liked principal had left because of the tough situation the proposal put him in: Asian parents, whose children make up roughly 75 percent of the school’s enrollment, have protested the plan to scrap the test.

Yet Contreras, the school’s first Hispanic principal, had also supported efforts to change demographics at the school, telling the Wall Street Journal that he favored using “mixed metrics” to determine admissions.

Contreras didn’t make any mention of the controversy in his initial goodbye letter, but he touted moves the school has made to try to enroll a more diverse student body. This year, just 10 out of 902 offers to attend Stuyvesant went to black students. Contreras described himself as “deeply invested” in diversity when he first took over.

On Friday, Contreras sent families a new letter, this time announcing that he would stay. He said he was flooded with emails and phone calls after he announced his resignation. “I was touched by your messages and thankful to be part of our vibrant learning community.”

You can read his full letter below.