Afghanistan's parliament rejected a second nominee for defense minister on Saturday, leaving a vacuum that has already lasted nine months, while government forces battled the Taliban just 30 miles west of the capital, Kabul.
The president's failure to nominate a full cabinet since he took office in September has sown great discontent among Afghans, and Saturday's vote was seen as a test of his government's influence over parliament.
As the Afghan army remained without political leadership on Wednesday, Taliban militants were fighting the government for checkpoints in Wardak province, some 30 miles (50 kilometers) west of the capital, the governor's office said in a statement.
At least 24 members of the police were killed in the two-day battle, it said, and fighting was ongoing.
Security has deteriorated across the country and many blame the government, for squabbling over key security posts at a time when U.S. military support is severely limited.
U.S. Senator John McCain of Arizona, visiting Kabul on Saturday, told reporters that Taliban attacks had increased and U.S. troops should stay longer than planned to prevent the militants from making gains.
There are around 9,800 U.S. troops left in Afghanistan, down from a peak of around 100,000 in 2011. The majority are training Afghan forces, but a contingent of several thousand are still engaged in combat.
"A calendar-based withdrawal — that would be a tragedy, and in my view, an opening for the Taliban to gain and create success here in Afghanistan," McCain said.
Under the current plan, the United States would draw down to an embassy presence in Kabul by the end of 2016.
Mohammed Masoom Stanekzai received 84 out of the 107 votes required to get the defense ministry post. A total 231 votes were cast.
Stanekzai, the former peace representative, was nominated as acting minister at the end of May and had taken charge of the army at a time when most foreign troops have departed and the Taliban are gaining territory.
The first nominee for defense minister was rejected in January and the second dropped out before being put to the vote.