HERAT, Afghanistan (Reuters) - Taliban fighters emerged from hiding in the dead of night to launch attacks in the Afghan city of Farah, battling government forces who thought they had cleared out the insurgents following heavy clashes earlier in the week, residents and officials said.

Residents look at an Army vehicle which was damaged during battle between Afghan security forces and Taliban in Farah province, Afghanistan May 16, 2018. REUTERS/Stringer

The heavily armed fighters had gone to ground in residential areas following their surprise attack on Tuesday, when they nearly overran Farah, before Afghan troops backed by U.S. air power fought them off.

“From one side, there were Taliban and from the other side, war planes firing from the air. People were terrified,” said city shopkeeper Qudratullah.

The Taliban fighters emerged from their hiding places about an hour before midnight on Wednesday, some of them firing on security forces from rooftops, with gunbattles raging into the early hours of Thursday.

At least one suicide bomb attack was launched near the city’s police headquarters.

“The city has been turned into a military zone, people are worried and shops are closed,” said resident Baz Mohammad.

“After what happened last night, anything can happen any time.”

Schools were also declared closed for the whole of the month of Ramadan, which began on Thursday, because of the security situation, said Kabir Haqmal, media advisor to the ministry of education.

After months of relative calm over the winter, the latest fighting underlines the challenge facing the Kabul government and its U.S. allies who are struggling to contain the Taliban insurgency.

The United States has sent thousands of extra trainers to help Afghan forces and stepped up air strikes dramatically, with the aim of pressing the Taliban to the negotiating table, but there has been little to indicate the plan is working.

BLAMING IRAN

In Farah, U.S. forces have provided air support with A-10 attack aircraft and pilotless drones, while the Afghan air force has conducted numerous strikes with its own helicopters and A-29 ground attack aircraft.

Officials had earlier said the city was clear of Taliban but confirmed the fighting overnight.

“A number of Taliban clashed with Afghan forces in different parts of the city,” said Fazel Ahmad Sherzad, the city’s police chief.

“Right now there is no fighting but a search and clearance operation is underway,” he said.

He said a number of foreign fighters appeared to be operating with the Taliban but there was no way of independently verifying that. Officials in Farah often blame neighboring Iran for helping the Taliban in the area.

Fighting has increased across Afghanistan in recent weeks with government forces under heavy pressure in provinces including Badakhshan, Baghlan and Faryab in the north, Farah in the west and Zabul and Ghazni south of the capital Kabul.

In addition, Kabul itself has been targeted by a wave of suicide attacks that have killed and wounded hundreds of people since the beginning of the year.

Remote and sparsely populated Farah, on the border with Iran has seen heavy fighting for months with Taliban forces inflicting heavy casualties on the police and army and even on elite special forces units.