Gharyan was on the trade routes both south to Fezzan and over the Nafusa Mountains. By 1884 the Ottomans had established a mayor and town council in Gharyan. It was considered the center of Libyan resistance against the Italian invasion in the early 20th century.
In early 2011, the city became involved in the nationwide anti-Gaddafi uprising. Initially successful, on 2 March, government forces retook it. In April, rebels succeeded in occupying several nearby towns and establishing a second territory on the focal town and the first town demonstrate their will against regime on the 16 Feb. ZENTAIN Libya besides Misrata that is no longer under the control of the Gaddafi forces, but as of late June the rebels had still failed to take Gharyan. On 13 August 2011, the rebel forces in Libya initiated a new battle for control of the city and were in control within two days.
On April 4, 2019, the city fell to forces loyal to Tobruk-based General Khalifa Haftar as part of a wider Libyan National Army offensive in western Libya. In late June, the city was recaptured from the LNA in a counteroffensive by forces of the Tripoli-based Government of National Accord, aided in their efforts by collaborating citizens of the city mobilizing against the LNA forces. The LNA restarted the offensive in June 2020.
Lady of Gharyan
Just west of Gharyan, there is a primitive road tothe right, which provides a bumpy trip to a derelict former Italian barracks, a relic of World War II. There is a crumbling building at the camp. Painted on the bricks of one of the walls inside the building is an enormous representation of a naked woman, lying on her side, American pin-up style. The upper torso of the woman is shaped as an inaccurate representation of the North Africa coast, and the salient points of her anatomy are marked with names of North African towns. The "Lady of Garian" was drawn by Clifford Saber, a volunteer American ambulance driver with the British 8th Army. Saber created the mural to help boost the morale of his fellow servicemen, finishing on 2 March 1943, while his unit was housed for a few days at the barracks in Gharyan.
Climate
Gharyan experiences a hot semi-arid climate, with blazing summers and cool winters; its winters being one of the coldest in Libya. Due to its winter months being relatively 5º degrees colder than Tripoli, the locality sees a cooler variation of said climate, though its higher elevation also meant that the town gets a dozen millimetres more precipitation then Libya's capital city.
Transport
In the 1920s, the Italians built a long railway between Tripoli and a village near Gharyan that was destroyed by the British during World War II.
Economy
Thanks to its mountainous climate, figs are grown for local consumption, with olives and saffron, for both local use and export. Gharyan is also well known for its ceramics industry.