MPs in Turkey have voted to send troops to Libya to help the UN-recognised government in Tripoli fight forces loyal to a rival government.
They voted 325-184 at an emergency session on Thursday to give Ankara a one-year mandate to deploy soldiers.
There are concerns that Turkish forces could aggravate the conflict in Libya, but Ankara says the deployment may be needed for Turkey to safeguard its interests in Libya and in the eastern Mediterranean.
The government of Libyan Prime Minister Fayez Sarraj, which is based in Tripoli, has faced an offensive by the rival regime, based in the east, who are allied to Army commander General Khalifa Hafter.
The fighting has threatened to plunge Libya into violent chaos rivalling the country's 2011 conflict that ousted and killed longtime dictator Moammar Gadhafi.
Fresh protests in Benghazi after the Turkish vote
After the vote in Turkey, people in Benghazi took to the streets to protest Turkey's involvement in Libya, calling it a "Turkish invasion" and chanted slogans in support of Hafter's regime.
The Foreign Affairs spokesperson of the east-based government, Abdelhadi Al-Hwajj said in a news conference that the battle in Tripoli would be "swift and decisive."
Al-Hwajj also added that his government was communicating with the UN Security Council, European countries, the African Union and the Arab League about the Turkish decision.
Sarraj asks Turkey for support
Turkish President Recep Tayyip Erdogan last month said that Sarraj had requested the Turkish deployment after the two leaders signed a military deal allowing Turkey to send military personnel and experts to Libya.
This deal combined with a separate agreement on maritime borders between the two countries has angered many in the region.
Greece, Israel and Cyprus say the move is "dangerous threat"
The leaders of Greece, Israel and Cyprus denounced the move as a ``"dangerous threat to regional stability" and a ``"dangerous escalation'' of the Libyan conflict that violates U.N. resolutions and undermines international peace efforts.
``"The repercussions of such a reckless move will be dire for the stability and peace of the entire region,``" Greek Prime Minister Kyriakos Mitsotakis, Cypriot President Nicos Anastasiades and Israeli Prime Minister Benjamin Netanyahu said in a joint statement.
``"Ankara should refrain from taking such action, which blatantly violates Libyan national sovereignty and independence."
Turkey has said that the deployment in Libya is essential for Turkish to protect its interests in the Mediterranean region.
`"A Libya whose legal government is under threat can spread instability to Turkey,``" ruling party legislator Ismet Yilmaz argued in defence of the motion. ``"Those who shy away from taking steps on grounds that there is a risk will throw our children into greater danger.''
Turkish Vice President Fuat Oktay said that Turkey would send ``the "necessary number (of troops) whenever there is a need", the state-run Anadolu Agency reported.
He added that Turkey would not dispatch its forces if Libya's rival government halts its offensive.
``"If the other side adopts a different stance and says `'OK, we are withdrawing, we are backing down,' then why would we go?'' Oktay said.
The government has not revealed details about the possible Turkish deployment. The motion allows the government to decide on the scope, amount and timing of any mission by Turkish troops.