Mr. Noor, 54, is part of a generation of former warlords who saw their regional fortunes fluctuate over the past decade, some of them being sidelined or shifted to jobs in Kabul as a way to distance them from their power bases. He managed to maintain his firm grip in Balkh through a combination of patronage, delivering infrastructure projects, and improving security while neighboring areas grew increasingly violent as the Taliban made inroads. Even Western allies turned a blind eye to a history of human rights accusations against Mr. Noor because he was perceived as having a firm grip.

Shujahuddin Shuja, a member of the Balkh provincial council, said residents were now concerned that the new governor would not have the capacity to provide security in a difficult environment.

“Governor Noor had brought some of the groups under control — the thieves, the irresponsible militias,” Mr. Shuja said. “He had understandings with them, and they would not stand against him.”

Mr. Ghani had long made clear his dislike for Mr. Noor, often siding with his strong opponents. During the presidential campaign of 2014, Mr. Ghani repeatedly singled out Mr. Noor as an example of corrupt strongmen who needed to be reined in by the central government.

But the election went into a deadlock after large-scale fraud. Mr. Ghani came to lead a coalition alongside his rival Abdullah Abdullah, whom Mr. Noor had backed, and who now has the title chief executive, making half of all appointments.

Mr. Ghani’s bitter relationship with his coalition partner stagnated to the point of Mr. Abdullah calling the president unfit to rule. Then Mr. Ghani started direct negotiations with Mr. Noor in the hopes of marginalizing Mr. Abdullah.

The negotiations broke down after months, further dividing a Jamiat party already struggling for unity. Mr. Abdullah remains firmly in the government, and has even clashed with Mr. Noor in recent months. Sources aware of Mr. Abdullah’s position said that he had agreed with the president’s decision to remove Mr. Noor, but that he had questioned its timing. And there remains the question of whether Jamiat representatives in the government would answer to party leaders like Mr. Noor, or to Mr. Abdullah, who leads the bloc in the government.