Turkey has suspended operations in its Tripoli embassy as the security situation continues to deteriorate in the country.

More than 500 Turkish nationals were transferred to Tunis by bus yesterday and flown out by Turkish Airlines on Friday, said a statement released by the Turkish foreign ministry.

The embassy's core staff will continue their operations until the situation stabilizes in the country, while the Misurata Consulate will serve Turkish nationals who choose to stay in the country, it added. 

 Turkey's foreign ministry warned Turkish citizens to leave Libya and avoid traveling to the country on July 23.

Benghazi has been the scene of mounting crime and militancy since the 2011 ouster and death of former Libyan leader Muammar Gaddafi.

The city has also witnessed sporadic fighting between forces loyal to renegade general Khalifa Haftar and Islamist militias, the latter of which have become a common feature of post-Gaddafi Libya.

Haftar declared war on armed militias based in eastern Libya in May, vowing to "purge" the country of "extremists".

The Libyan government has called the former general's campaign a coup.

After serving as army chief-of-staff under Gaddafi, Haftar spent nearly two decades in the United States in exile before returning to Libya in 2011 to join the uprising against the long-serving autocrat.