The Tripoli interior ministry's special forces unit, on its Facebook page, said the IS "emir" for Sabratha, Mohamed Saad al-Tajuri, also known as Abu Sleiman, was seized in the city, 70 kilometres (45 miles) west of the capital.
It did not specify his nationality or those of his two aides.
Clashes were ongoing yesterday in two areas west of Sabratha between IS and forces loyal to the Tripoli government, said the Lana news agency which is close to the unrecognised government.
A US air strike near Sabratha last week targeted a suspected IS training camp, killing 50 people. Serbia said two of its diplomats being held hostage were among the dead.
Also Read
IS has taken advantage of growing chaos to expand its foothold in Libya, which has rival administrations vying for power.
The internationally recognised government fled Tripoli in mid-2014 after the Fajr Libya militia alliance overran the capital and set up its own parliament.
The group has since attacked key coastal oil facilities and staged a string of suicide bombings.
In second city Benghazi, "violent fighting" broke out yesterday between forces loyal to Libya's internationally recognised parliament and armed groups including Islamic State jihadists, a military official told AFP.