Lawmakers vote 325-184 in favour of sending troops to the northern African country, following calls from the Tripoli government for Ankara's support against Khalifa Haftar's illegal militia.
Turkey's parliament passed a bill on Thursday approving a military deployment to Libya, hoping it will shore up the UN-backed government in Tripoli.
Turkish lawmakers voted 325-184 at an emergency session in favour of allowing a one-year mandate to deploy troops and follows a request for assistance by the beleaguered Tripoli government, which has been under sustained attack since April by warlord Khalifa Haftar.
Haftar has the backing of Saudi Arabia, Egypt, and the United Arab Emirates.
The governing Justice and Development (AK) Party, and Nationalist Movement Party (MHP) backed the motion, while the main opposition Republican People's Party (CHP), opposition Peoples' Democratic Party (HDP) and opposition Good (IYI) Party voted against the motion.
"Libya's Government of National Accord made a military request from Turkey in the struggle of threats towards Libya's unity and stability," the motion said.
It added: "If so-called Libya's National Army's attacks could not be stopped and if the clashes [in Libya] turn to massive civil war, Turkey's interests will be negatively affected both in the Mediterranean basin and in northern Africa."
'We are ready'
President Recep Tayyip Erdogan's office confirmed last Friday that a request for military support had been received from the UN-backed Tripoli-based Government of National Accord (GNA).
No details have been given on the scale of the potential deployment, and Vice President Fuat Oktay told Anadolu Agency on Wednesday that no date had yet been set.
"We are ready. Our armed forces and our defence ministry are ready," he said, adding that parliamentary approval would be valid for a year.
He described the parliament motion as a "political signal" aimed at deterring Haftar's army.
"After it passes, if the other side changes its attitude and says, 'OK, we are withdrawing, we are abandoning our offensive,' then what should we go there for?"
A UN report in November said several countries were violating the arms embargo on Libya in place since the overthrow of its former leader Muammar Gaddafi in 2011.
Jordan and the UAE regularly supply Haftar's militia, it said, while Turkey supports the GNA. Turkish and Emirati drones were spotted in Libyan skies during clashes over the summer.
Turkish parliament witnesses "intense debate" and "charismatic" speeches while approving Libya military deployment. TRT World's Hasan Abdullah has more pic.twitter.com/0GzwWDo2Kl— TRT World Now (@TRTWorldNow) January 2, 2020
The Libyan conflict is expected to be a key topic of discussion when Russian President Vladimir Putin visits Turkey next Wednesday.
Erdogan has repeatedly accused Russia of sending private mercenaries to support Haftar's militia, though this has been denied by Moscow.
It is expected to be a key Turkey and Russia have managed to work closely on Syria despite supporting opposing sides in that conflict.
"We're supporting the internationally-recognised legitimate government in Libya. Outside powers must stop supporting illegitimate groups against the Libyan government," Erdogan's communications director Fahrettin Altun tweeted last week.
Turkey and Libya signed a military cooperation agreement during a visit by Libya's leader Fayez al Sarraj to Istanbul in November.
Both sides also signed a maritime jurisdiction agreement giving Turkey rights to large swathes of the eastern Mediterranean where gas reserves have recently been discovered.