SIRTE, Libya (Reuters) - Several women blew themselves up on Friday in suicide attacks that killed four Libyan soldiers who had granted them safe passage to leave buildings under the control of Islamic State militants, a spokesman for government forces said.

Fighters of Libyan forces allied with the U.N.-backed government gather as they advance against Islamic State holdouts in Ghiza Bahriya district in Sirte, Libya December 1, 2016. REUTERS/Ismail Zitouny

The Libyan forces, backed by U.S. air strikes, are close to taking full control of the former IS stronghold of Sirte after a campaign lasting more than six months. But they have had difficulty dislodging Islamic State from a final patch of land near the city’s Mediterranean sea front, partly because of concerns about families or captives still held by the militants.

During a pause in fighting on Friday, Reuters journalists saw one woman escorting three young children through an alleyway toward waiting Libyan forces. Shortly after the children were driven away in an ambulance there was a blast as the woman detonated explosives, wounding about a dozen people.

Rida Issa, a spokesman for the Libyan forces, said two similar incidents, which he said were suicide attacks, had taken place as other women and children were leaving Islamic State-held ground.

Four members of the Libyan forces had been killed and 38 wounded, Issa said.

Earlier this week there was a lull in the fighting in Sirte before Libyan forces resumed a heavy artillery assault on Islamic State positions on Thursday.

U.S. air strikes have continued, but Islamic State has largely held its ground and even retook control of one row of buildings that had been mostly demolished in previous fighting.

As of Thursday, U.S. forces had carried out 470 air strikes on Sirte since starting their air campaign over the city on Aug. 1, U.S. Africa Command said.

Issa said field commanders had noticed especially fierce resistance on Friday from one of the buildings still held by Islamic State, and believed that senior militants might be positioned there.

Several groups of families or hostages have been freed or escaped from Islamic State in Sirte in recent weeks, some of them migrants from sub-Saharan Africa who were captured by Islamic State as they crossed Libya.

“The investigation will tell us whether these women were fighting with Daesh (Islamic State), or if they were captives,” Issa said of those who got out on Friday.

Islamic State took full control of Sirte in early 2015, imposing its ultra-hardline rule over the city in the months that followed. Forces led by brigades from Misrata began a campaign to retake Sirte after Islamic State advanced toward their city in early May.