Blasts were heard at the headquarters of the National Oil Corporation (NOC) in the Libyan capital on Monday and a security operation was under way at the building, a Reuters witness said.
Smoke could be seen rising from close to the NOC offices and security officials said they were attempting to deal with militants believed to have attacked the building.
The chairman Mustafa Sanallah was safely evacuated, a Reuters witness said.
Sanallah could be seen being driven away in a car.
Security forces took up positions around the offices in central Tripoli and surrounding roads were cordoned off.
A Reuters witness saw ambulances leaving the site. A member of staff from a hotel next to the NOC offices said he had heard about five blasts.
Tripoli was shaken by clashes between rival armed groups at the beginning of this month but the capital has also seen occasional militant attacks.
In May, ISIS claimed a deadly attack on the national election commission offices in Tripoli.