Islamic State suicide bombers attacked Libya's pro-government forces in the IS group's former stronghold city of Sirte on Thursday, detonating two cars bombs that killed at least 10 troops, officials said.

Ahmed Hadia, a spokesman for troops loyal to the U.N.-backed government who are fighting to liberate the city, said the attack came in the western part of Sirte. The death toll is expected to rise since many of the 20 troops wounded were in critical condition, he added.

"We believe it was conducted by IS fighters who were already outside of Sirte and came to aid their fighters there, who we are surrounding as they remain in their last areas," he said, adding that the cars rammed into the troops' positon at a rallying area and a checkpoint before detonating their explosives. After the attack, pro-government forces launched a raid into a residential neighborhood in the city, killing three IS fighters, he said.

Sirte is IS's final bastion in the country, and Libyan troops have been forcing the militants into ever-smaller bits of territory there, backed by U.S. airstrikes. Suicide attacks are a much-used tactic by the extremist group.

Libyan officials say the pro-government forces have liberated 70 percent of the city, after seizing several strategic locations last week. They have lost hundreds of fighters in the push to take the city, and estimate that dozens of IS militants have been killed. Hundreds of IS militants are believed to still remain in the city, which lies on the Mediterranean coastline.

Libya descended into chaos following the 2011 ouster and killing of dictator Moammar Gadhafi. The country has been split between rival parliaments and governments, based in Tripoli and the country's far east, each backed by an array of militias and tribes.

In December last year, the United Nations struck a deal with Libya's rival factions to create a unity government led by Fayez Serraj. He still needs a crucial vote of confidence from the internationally-recognized parliament, based in eastern Libya.

The security and power vacuum has encouraged both human trafficking and the Islamic extremists to establish a permanent presence in Libya, especially along the coastline.