De’Shawn Wright, the D.C. deputy mayor for education, who has played a key role in decision making about the future of the city’s public schools, is leaving his post for a job in New York state, Mayor Vincent C. Gray (D) announced Thursday.

Wright will serve as New York’s deputy secretary for education, a top state education post. Wright’s chief of staff, Jennifer Leonard, will begin serving as the interim deputy mayor for education in November.

“De’Shawn is a brilliant educational innovator and a tireless public servant, and our loss is definitely New York’s gain,” Gray said in a statement. “He has done a spectacular job serving the children, families and educators of the District of Columbia, and we will miss his extraordinary gifts sorely.”

The departure comes at a critical moment for education in the District, as officials try to envision and plan for the future of both traditional D.C. public schools and charter schools, systems that operate independently and often compete for city resources.

Wright has been leading that planning effort. In January, his office released a controversial study that recommended opening more high-performing charters and turning around or closing dozens of low-performing traditional public schools.

D.C. Schools Chancellor Kaya Henderson has said repeatedly that some schools must be closed, and she is expected to announce closures in the coming weeks.

The study, the impending closures and the continued growth of charter schools — which enroll more than 40 percent of the city’s public school students — have sparked a backlash from community activists who say they fear the dismantling of the traditional school system. The resistance is likely to intensify when closures are made public.

“It’s gearing up to be a brutal battle,” said Nathan Saunders, president of the Washington Teachers’ Union, who said he had been looking forward to working with Wright “to allay some of the concerns.”

Wright said his departure has nothing to do with the political situation. “Anyone who thinks I would shy away from tough work is misinformed and doesn’t know my history,” he said.

He said the New York job was just the right opportunity at the right time — a chance “for me to return home to lead education statewide in a place where I started my career.”

Wright was a Teach for America corps member in New York City in the late 1990s. He later worked for the New York City Department of Education and as chief policy adviser to Newark Mayor Cory Booker before joining Gray’s team in 2011.