Taliban suicide bombers and gunmen have attacked a foreign guesthouse near parliament in the Afghan capital, the latest assault targeting foreigners as NATO troops withdraw from the country, witnesses and police said.

Interior ministry spokesman said two of the three assailants were gunned down by Afghan forces, and one suicide bomber died after detonating his explosive. Two foreigners were also killed in the attack. 

Al Jazeera's Charles Stratford, reporting from Kabul, said the Taliban has confirmed carrying out Saturday's raid. The government's passport office and offices of non-governmental organisations located nearby also came under attack.

The attackers were reportedly wearing Afghan national army uniform when they carried out the attack.

Live Box 201491152731407786

The Taliban has waged a series of large-scale attacks in Kabul and across the country in recent days.

Soldiers killed

Earlier on Saturday, Taliban fighters also launched a separate attack in a major Afghan camp in southern Helmand province that killed eight soldiers and 26 fighters.

The base was once known as Camp Bastion until the British handed it over last month. Camp Bastion also once held Camp Leatherneck, a US Marine base in the volatile southern province.

"The Taliban has vowed to continue to step up their attacks on both foreign targets and the Afghan National Security Forces (ANSF) in the wake of the approval of the security agreement," Al Jazeera's Stratford said.

Under the agreement, recently approved by Afghanistan's upper house, foreign troops will remain in the country to fight the Taliban and train the Afghan army.

Also on Saturday, suicide bombers attacked another military base in the Snagin district, killing five soldiers and wounding seven.

The 13-year NATO combat mission finishes at the end of this year, to be replaced by a 12,500-personnel follow-up mission to support the Afghan army and police who are now responsible for defeating the Taliban.

NATO troop numbers in Afghanistan peaked at 130,000 in 2010, and fears are growing that the declining international presence will lead to an increase in Taliban activity.

Source: Al Jazeera and agencies