KABUL, Afghanistan — Fierce gunbattles raged for a second day Tuesday across Afghanistan’s embattled northern city of Kunduz after the Taliban launched a new, multipronged attack on the city they had briefly captured last year, officials said.

Interior Ministry spokesman Sediq Sediqqi said Afghan security forces were “trying to secure the city” but that Taliban gunmen are hiding in residential homes, making progress slow and difficult.

The Taliban began their attack from all directions early the previous day. They briefly raised a flag over a main intersection before being repelled from the city center.

Mohammad Yusouf Ayubi, the head of the Kunduz provincial council, said the city has become a battlefield, with fighting going on in many different areas on Tuesday.

“We can’t go to our (council) office because the area is under the control of the Taliban,” he said, adding that council members instead were gathering at a location about 1.5 kilometers (about a mile) from the city.

Taliban militants have planted mines in different areas of the city, making movement extremely difficult, he said. “Local people are trapped in their homes.”

The city fell to the Taliban a year ago before the insurgents were beaten back by Afghan forces with the help of U.S. airstrikes. It is the capital of Kunduz province, a breadbasket region that borders Tajikistan to the north and sits on a major crossroad in the country.

Kunduz’s fall last year sent shockwaves across the country and among Afghanistan’s backers in the international community as it marked the Taliban’s first capture of an urban center since the group was driven from power in 2001. The city came under threat again in April, when U.S.-backed Afghan forces pushed the Taliban back into surrounding districts.

U.S. military spokesman in Afghanistan, Brig. Gen. Charles Cleveland said the Afghan military had moved reinforcements into Kunduz overnight.

“While there is sporadic fighting, the government controls Kunduz,” he said, adding that “U.S. forces … will provide support as needed.”

While Cleveland said there had been no U.S. airstrikes overnight, “there was one US air-to ground engagement by helicopter on the outskirts of Kunduz city to defend friendly forces.”