Update: Carvalho flip-flopped and turned down the job in dramatic fashion on Thursday. More here

Alberto Carvalho, the longtime superintendent of the Miami school system, will become New York City’s next schools chief, according to the mayor’s office.

Carvalho will replace schools Chancellor Carmen Fariña, who announced in December that she planned to step down as leader of the nation’s largest school system.

“Alberto Carvalho is a world-class educator with an unmatched track record of success,” Mayor Bill de Blasio said in a statement Wednesday evening. “I am very confident that our extensive, national search has found New York City the best person to lead the nation’s largest school system into the future.”

The mayor had held off on making a public announcement in recent days due to the fatal school shooting in Florida this month, according to a person briefed by City Hall, and he had no public events listed on his schedule for Thursday. A Miami-Dade County Public Schools spokeswoman said on Wednesday evening that Carvalho had been offered the New York City job but had not yet accepted it.

Carvalho, who has run the Miami-Dade county school district since 2008, closely fits the mold that de Blasio had cast for a new schools chief: He comes from a diverse background, has been an educator his entire career, and is adept at selling his message.

Born in Portugal, Carvalho came to the U.S. as an undocumented immigrant and speaks multiple languages, including French and Spanish. He first landed in New York City, where he spent weeks scrubbing pots in greasy-spoon restaurants in Manhattan, but quickly made his way south, where he says he was homeless and slept in the back of a U-Haul truck while attending community college.

As a young science teacher at Miami Jackson Senior High in Miami, he was known for dressing in formal suits and ties (a practice he continues to this day), earning him the nickname “Mr. Armani.” Carvalho worked his way up the ladder, becoming an assistant principal and later an associate superintendent before taking the reins as superintendent of the country’s fourth-largest school district.

Carvalho ran into trouble, though, when emails surfaced that suggested he had a romantic relationship with a Miami Herald reporter covering the district. But since then, Carvalho has managed to largely avoid controversy, racking up accolades and awards and growing into a popular political leader.

“He’s reached a ceiling here,” said Joe Gebara, the immediate-past president of the Miami-Dade County PTA.  

The district was virtually bankrupt and had just ousted its previous leader, former New York City chancellor Rudy Crew, when Carvalho took over. Since then, he has dramatically shrunk central spending, built budget reserves, and won the trust of voters in Miami, who approved a $1.2 billion bond to fix up school buildings and pay for better technology.

Carvalho has been named superintendent of the year and helped the district win the Broad Prize for Urban Education. The district’s graduation rate is at an all-time high of about 80 percent, and it has pursued initiatives that echo de Blasio priorities, such as providing more Advanced Placement classes, especially for students of color.

“Who wouldn’t want Mr. Carvalho? He has done an amazing job here in 10 years,” said Lawrence Feldman, a longtime Miami-Dade school board member.

He also spearheaded an effort to eliminate out-of-school suspensions, similar to the push in New York City under de Blasio. He has railed against standardized testing, leading an effort to cut back on district-mandated exams. His philosophy for turning around struggling schools also fits well with de Blasio’s. In Miami-Dade, Carvalho pushed out many under-performing principals and established an office to support needy schools with instructional and behavior coaches.

But Carvalho is not without his critics, and has lately faced growing pushback from his own board, which in the past has been largely pliant. The board has called for an audit of the bond spending, along with regular updates about where the money is going, and there has been friction over whether the district should challenge a new state law that is favorable to charter schools. Advocates question whether students are showing up to alternative school sites when they’re suspended, and whether the education provided there is adequate.

Politically skilled, Carvalho’s name has often been floated for top jobs in education and beyond. He was rumored to be considered by Hillary Clinton for a possible U.S. Education Department job, and recently weighed a run for Congress.

But his out-front leadership style could make his transition to New York City difficult, where de Blasio has appeared to be looking for someone who will run with the agenda already in place.

The Miami-Dade schools board has called an emergency meeting for Thursday morning to discuss “the stability of the executive management leadership.”

Alex Zimmerman contributed reporting.