Tripoli is the capital and largest city of Libya . Its population was (940,653) thousand in 2012 , located in the northwest of Libya. The city is built on a rocky head overlooking the Mediterranean Sea opposite the southern tip of Sicily . It is bordered to the east by the Tajura region, to the west by Janzur , to the south by the Sawani area, and to the Mediterranean by the north . The center of the city is the Martyrs' Square and the Red Serail . The city of Tripoli is described as "the bride of the Mediterranean", for the beauty of its groves and white buildings. Tripoli is also called the "Tripoli of the West" to distinguish it from " Tripoli Sham " in northern Lebanon .