Richard Buery, the deputy mayor who oversaw the de Blasio administration’s celebrated expansion of pre-kindergarten while also trying to ease tensions with the charter-school sector, is stepping down, the mayor said Thursday.

After initially turning down the job — which offered lower pay and greater public scrutiny than in his role as head of the Children’s Aid Society — Buery agreed in early 2014 to pilot the rapid buildout of the city’s free pre-K program, which was the centerpiece of Mayor Bill de Blasio’s first-term agenda. Within a year and a half, Buery had helped the city create about 50,000 additional pre-K seats while avoiding any major mishaps or controversies — a feat that helped the mayor glide to reelection this month.

“Never before have I had a job where I had 9 o’clock evening daily phone call with my team,” Buery said Thursday at a press conference where de Blasio announced several changes to his cabinet ahead of his second term. Despite its intensity, Buery called the job “an honor and a pleasure.”

Buery — who, until now, was the highest-ranking black official in City Hall and a rumored contender to be the next school’s chief — oversaw several other education initiatives beyond pre-K. Those included the creation of 215 “community schools,” which offer wellness and social services for students and their families; the expansion of after-school programs for middle-school students; and the establishment of a “children’s cabinet” to coordinate the efforts of dozens of city agencies that interact with young people.

More recently, he helped start a new city-run preschool program for 3-year-olds, modeled off the pre-K expansion — an idea the mayor attributed to Buery.

“Richard will be forever remembered as the person who started that initiative on its path,” de Blasio said Thursday.

Buery also played a crucial role as an intermediary between City Hall and the city’s charter-school sector, which have clashed since de Blasio took office promising to reign in the publicly funded but privately run schools. He was ideally positioned to play peacemaker: Before joining the de Blasio administration, he had helped found a Children’s Aid Society charter school, and he counted the leaders of the some of the city’s largest charter networks as friends.

He walked a fine line in his informal mediator role. For instance, he joined the mayor in opposing a state plan to allow more new charter schools to open, yet he sided with charters in their push to receive public money to pay for building rental.

“In Rich, we had a natural ally,” said Steven Wilson, chief executive officer of the Ascend charter network, in an email. “He understood our constraints and challenges, and was always willing to give voice to them with the Mayor.”

“If the administration doesn’t bring in someone similarly experienced, intelligent, and supportive,” he added, “it will be a loss to the sector.”

Yet, not everyone in the charter sector has had a warm relationship with Buery.

Dan Loeb, chairman of Success Academy charter schools — the network that has feuded most bitterly with the de Blasio administration — upbraided Buery in racially charged emails recently published by Politico New York. In a June email, Loeb called Buery “smug and satisfied” and an “apologist for the failing status quo” that leaves “poor black kids” with an inadequate education.

In an interview Thursday, Buery told Chalkbeat that he had tried to bridge the divide between members of the charter sector and City Hall, but the “really toxic, ugly politics that we have” sometimes got in the way.

“There’s still too much unnecessary negativity and ad hominem attacks and I don’t think it’s productive,” he said. “We’d do a lot better if we spent more time talking and less time yelling.”

Buery arrived at City Hall with a compelling backstory.

The son of immigrants from Panama, he grew up in East New York, Brooklyn, before graduating from Stuyvesant High School and enrolling in Harvard at age 16. He later attended Yale Law School, taught at an orphanage in Zimbabwe, and founded multiple youth-focused nonprofit groups.

Buery will remain in his post for the next few weeks while the administration seeks a replacement. In the interview with Chalkbeat, he shot down any suggestion that he might become the city’s next schools chancellor — “I never have aspired to that role” — but also said he did not have another job lined up. 

In his next role, he said, he is seeking a way to push back against the policies of President Donald Trump, which he called “the most un-American administration of my lifetime.”

“In one way it’s a terrible time, a challenging time for the country,” Buery said. “But in another way it’s an incredible opportunity in the country to stand up and articulate the values we believe in and stand up for those values. And I want to continue being a part of that.”

Monica Disare contributed reporting.