In November, Afghanistan’s President Ashraf Ghani, center, sits next to Chief Executive Abdullah Abdullah. The two head the National Unity Government. (Rahmat Gul/AP)

— As Afghanistan begins an uncertain new phase of coalition governance and self-defense against Taliban insurgents, protracted delays in forming a cabinet and filling most top posts in the three-month-old administration have left public agencies in disarray and Afghans wondering who is in charge.

This week, as the last Western combat troops left Afghanistan, President Ashraf Ghani hailed a new era of national pride and independence in a televised speech from his palace. He said that the country has “passed two difficult tests” with transitions to a new civilian government and military control and that the next challenge is to build a solid economy.

But Ghani said nothing about the high-level vacancies in the government he heads in partnership with his former rival, Chief Executive Abdullah ­Abdullah — an issue that has left the nation in a state of anxiety and the wheels of the nascent national unity government wobbling. Most senior federal and provincial posts are empty or in caretaker hands and many projects are on hold, leaving a growing impression that no one is at the helm just as the country needs a strong leadership team to fend off a resurgent Taliban and grapple with corruption.

In one province, police officials have been fired and not replaced despite a rash of violent crime. In another, frustrated parents are calling their legislators to get copies of school records. In the capital, no phones were answered at one federal ministry last week — an unusual occurrence even by lax Afghan standards. In another ministry, idle office workers made a video of one another dancing in the halls, which was later shown to a reporter.

“Everything is stuck. There is no framework, no direction, no one setting priorities or making decisions,” said Fawzia Koofi, one of many national legislators who have expressed similar concerns. “In a country like ours with a weak political system, you need strong ministers and governors to provide leadership, but we still don’t have any. So those below are either doing nothing or they are using the chance to do wrong things.”

Public concern over the lack of appointed leaders, especially in the Defense Ministry and other security agencies, has been exacerbated by a spate of recent insurgent attacks across the capital in which militants bombed or opened fire on foreign compounds, police facilities and even a live theater performance.

But Ghani and several security aides who spoke at the palace ceremony this week stressed the government’s determination and capacity to confront Afghanistan’s enemies without continued foreign combat support.

“Your sons went home, but our sons will continue to sacrifice for Afghanistan,” Ghani said, referring to the departed U.S. and NATO troops. “Today our forces take full responsibility for the entire country, and Afghanistan’s security will lead to world security.”

Ghani and his advisers have continued to ask for patience after failing to meet several deadlines to form a cabinet. Last week, the president met with a group of legislators and promised to announce the first group of nominees by next week, but several parliamentary leaders said they were so fed up that they might refuse to ratify his choices.

Palace aides say the appointment process has been delayed by conflicting demands for professional competence, ethnic balance and political rewards, as Ghani and Abdullah have divided key agencies and negotiated over candidates.

By all accounts, the crucial pending decision in this Rubik’s Cube of interlocking scenarios and deals is who will head the Interior Ministry, a powerful ethnic fiefdom awash in weapons and riddled with graft. Ghani and Abdullah are believed to have agreed on most other ministries, but both leaders face continued pressure from their respective allies to appoint different individuals to the high-stakes post.

Meanwhile, the stalemate has affected services and morale at numerous other public agencies — some of which have been adrift for much of the past year because of the prolonged presidential campaign and election. Legislators, analysts and former officials say routine bureaucratic functions are being neglected, “acting” ministers are reluctant to sign orders, lower-level jobs are going unfilled and projects are stalled.

The paralysis extends to newly created, high-level government offices. This week, the Tolo TV news channel reported that the Office of the Chief Executive remains largely unstaffed, despite being allocated about 500 positions, because the president has not signed decrees authorizing its funding. It said a special agency announced by Ghani to promote reform and good governance, with about 200 positions, has remained unstaffed for the same reason. The channel quoted spokesmen for both agencies confirming that the funding had not been approved.

Some Afghans who supported Ghani’s presidential bid and reformist agenda said the delays have resulted in part from excessively strict conditions he placed on all senior jobs. By banning former ministers, parliamentarians and dual nationals from heading agencies, they said, he cut out many members of the country’s small professional elite.

One former cabinet minister, who was dismissed by Ghani in November along with all other ministers, blamed the paralysis on a different problem: the political conflict inherent in what he called the “two-headed” government that was brokered by U.S. officials after last year’s elections — which included a runoff between Ghani and Abdullah — collapsed amid charges of fraud.

“The problem is not technical deficiency, it is the lack of political will,” said the ex-minister, who spoke on the condition of anonymity so he could talk frankly. “In my ministry, there are two or three people from both the Ghani and Abdullah camps who are well qualified to take over my job. We are responsible for many thousands of employees and a huge budget. There is no reason this should be taking so long.”

The prolonged absence of senior managers has had both annoying and worrisome effects. At the Ministry of Education, some teachers have gone without pay for months, and routine paperwork, such as changing a child’s school enrollment, is taking weeks. At the Ministry of Refugees, no one answered telephones in several management offices last week, and no one at the reception desk knew the whereabouts of the acting minister.

The independent Afghan Anti-Corruption Network warned recently that the ongoing delay in cabinet appointments has “created gaps of power and legitimacy within the government and has given . . . opportunity to corrupt officials to loot Afghans and Afghanistan.”

Yet the president’s eagerness to wipe out corruption and incompetence — a key part of his campaign platform — has also led to criticism that his actions are backfiring. Last week, during a trip to the far western province of Herat, Ghani abruptly dismissed a number of officials, including all 15 district police chiefs, after hearing complaints of malfeasance and poor performance. But he did not replace any of them, even though the area has been suffering a rash of murders and kidnappings.

“We have a terrible problem with insecurity. Business owners are being captured for ransom and mullahs assassinated,” said Hajji Shahid Zada, a legislator from Herat who accompanied the president on his visit. “Maybe some of the officials he dismissed were corrupt, but we never thought he would sweep out all of them and not bring in anyone new. It was unjust.”

Outside the halls of power, the delays have had a negative ripple effect on jobs and businesses in an ailing post-war economy with a small private sector, where public contracts, projects, jobs and bureaucratic connections are the keys to economic survival for thousands of Afghans.

On Thursday, several idle carpenters sat outside a row of workshops in a gritty section of west Kabul, smoking and discussing their problems. They said orders for their office desks, tables and cabinets dried up when the election crisis started and have yet to resume despite the installation of the new government in late September.

“I voted for Dr. Ghani because everyone said he had the best brains and would be good for our country’s future,” said one furniture maker, 27, who gave his name as Zabiullah. “But his government hasn’t brought any new business, only new taxes on our shops. I regret that I voted for him now, and so do a lot of the Afghan people.”