Islamic State militants in Libya have killed two Eritrean migrants after stopping a truck carrying 75 Africans of different nationalities.

The extremist group shot the migrants after holding them at an intersection 5km from their stronghold of Nawfliyah.

Military sources quoted by Libyan news website Bowabat Al Wasat said the pair were killed "in cold blood".

At least one of the other 75 migrants, also an Eritrean, was injured in the shooting. They were found lying by the roadside with gunshot wounds to the leg and taken to a nearby hospital for treatment.

The offshoot of IS in Libya has taken almost complete control of the central Libyan city of Sirte. At the end of May, the group captured the city's civilian airport, pushing out forces loyal to Libya's Tripoli-based government.

Isis Libya
Image: Sirte, Libya celebrates after IS announcement of the fall of Ramadi circulating 19 May 2015. SITE Intel

IS in Libya's influence around Sirte now extends some 150km to the east, along the coastal road to the town of Nawfliyah.

At the beginning of March, 166 Battalion loyal to Tripoli began a campaign in Sirte, the hometown of Libya's former ruler Muammar Gaddafi, to rid it of the Islamic State forces. However, despite some initial gains, the move proved unsuccessful.

IS has exploited a political vacuum in Libya over the past year, using a stalemate between the country's two rival governments to exert its control. A number of Islamist militias, remnants of Libya's 2011 liberation war, have allied themselves with the group.

In Libya's eastern city of Derna, IS beheaded a postal worker it claimed had volunteered to fight with the Libyan National Army, under the direction of Libya's internationally recognised government in Tobruk.

ISIS beheading Libya
Isis beheaded 21 Egyptian Coptic Christians in Libya in February Reuters

The group has carried out more than a dozen similar beheadings in Derna since it took control of the town's court system. In some cases it has carried out the executions in Derna's football stadium.

Fighters in Derna, a historic hot-bed of Islamist activity, declared their allegiance to IS in June 2014.

The jihadi group has increasingly targeted migrants working in Libya or those travelling through the country to board boats to Europe. In February, IS executed 21 Egyptian Coptic Christians on a Libyan beach. In April, the group beheaded 30 Ethiopian migrants and published propaganda showing the murders online.