KABUL (Reuters) - Taliban militants attacked a border outpost in western Afghanistan on Tuesday, killing 20 government soldiers in the latest assault likely to compound fears that the security forces are facing an unsustainable casualty toll.

Sparsely populated Farah, on the border with Iran, has seen months of heavy fighting, with hundreds police and soldiers killed. The Taliban threatened to seize the provincial capital in May.

In the latest violence in the province, the insurgents assaulted the border post manned by about 50 Afghan government soldiers before dawn, officials in the area said.

At least 20 soldiers were known to have been killed, several wounded and the others were missing, said a senior military officer who declined to be identified as he is not authorized to speak to media.

"Hours after the attack, we lost contact with the base and we still do not know the whereabouts of the remaining soldiers," the officer said.

The Taliban, fighting to oust foreign forces and overthrow the Western-backed Kabul government, claimed responsibility saying they had captured the base, killed 30 soldiers and seized weapons and ammunition.

Some officials in Farah have accused Iran, which the United States says is trying to extend its influence in western Afghanistan, of providing the insurgents with money and weapons. Iran denies the accusation.

The attack underlined the struggle Afghan security forces face in confronting the insurgents, who have steadily extended their control in the countryside, even though the government holds all provincial centers.

On Monday, the militants captured an important security post outside the central city of Ghazni, killing 13 members of government forces and underscoring their vulnerability even in areas where defenses have been bolstered.

More than 17 years after U.S.-led forces toppled the Taliban regime, Afghan forces are dying in record numbers with Afghan and U.S. officials warning that the casualty rate is not sustainable.

In September alone, more than 500 Afghan soldiers were killed and hundreds wounded, the Defence Ministry said.

Tentative steps toward peace talks between the Taliban and the United States have had no impact on the level of attacks.

The U.S. special envoy for peace in Afghanistan, Zalmay Khalilzad, met Taliban leaders in Qatar last month. The Taliban will also join multilateral peace talks hosted by Russia this week.

(Reporting by Jalil Ahmad Rezaee in Herat, Mohammad Stanekzai in Helmand; Writing by Hamid Shalizi; Editing by Robert Birsel)