MAZAR-I-SHARIF, Afghanistan — Atta Muhammad Noor, a strongman who has ruled a prosperous northern Afghan province more like a king than a governor for 13 years, was driving between meetings in Dubai last month when he got the call: President Ashraf Ghani was firing him.

For three years, Mr. Ghani had tried to ease Mr. Noor, 54, a commander of the mujahedeen resistance to the Soviets who then became a warlord in the civil war and in the battle against the Taliban, out of his spot as governor of Balkh Province, the country’s commercial hub. Negotiations over a deal that would see Mr. Noor finally leave in return for more government seats for his political party faltered. And when Mr. Noor began meeting with other important regional power brokers who were also critics of the president, Mr. Ghani decided he had finally had enough. He ordered Mr. Noor out.

The Afghan president may have miscalculated.

Since returning to Balkh, not only has Mr. Noor rejected the Afghan president’s firing of him, but he is using his defiance of the American-backed administration in Kabul as a platform to project himself as a player in the presidential elections that are supposed to happen next year.

A regional power’s rejection of the central government has long been seen as a likely test for the heavily centralized but potentially fragile Afghan state set up after 2001.