The Afghan military has regained control of a district in northern Kunduz province that fell to Taliban fighters earlier this month as part of their so-called spring offensive, security officials say.

Tuesday's advance came after Afghan forces launched a major operation against Taliban positions to retake the Qala-e-Zal district on Tuesday morning.

"The governor's building, police headquarters and several key areas are cleared of terrorists, but the operation is still ongoing in other insecure areas of the district," the interior ministry said in a statement.

According to local media, one Taliban fighter has been killed and two others wounded. There were no details about civilian casualties or deaths of security forces.

"Around 2,000 families have been displaced with most relocating in Kunduz city. Some have fled to other nearby districts," Assadullah Sadat, a member of the Kunduz provincial council, told AFP news agency.

The Norwegian Refugee Council (NRC) had earlier said that some displaced families were forced to sleep in the open while others were crammed inside the homes of relatives.

A Kunduz government spokesman added that security forces were clearing out landmines planted by fighters in the recaptured areas.

The Taliban had taken full control of the district on May 6 after they launched their so-called spring offensive.

READ MORE: Nearly 90,000 Afghans displaced in 2017, says UN

The offensive normally marks the start of the fighting season, though this winter the Taliban continued to battle government forces. An attack on a military base in the nearby city of Mazar-i-Sharif last month killed at least 135 security forces.

Kunduz is among the most violence-wrecked provinces in northern Afghanistan. Although the city centre itself is in government hands, the Taliban control most of the surrounding districts.

Security forces have been struggling to open the main highway into the city after it was blocked with mines and improvised roadside bombs.

Thousands of residents are reported to have fled their homes to avoid the fighting.

According to US estimates, the Afghan government controls only about 60 percent of the country, with the rest under Taliban control or contested by armed groups.