Turkey's parliament has backed a motion that could allow its military to enter Iraq and Syria to join the campaign against Islamic State (IS) militants.
The resolution - passed with a three-quarters majority - will also permit foreign troops to use Turkish territory for the operation.
Turkey has been under pressure to play a more active role in the US-led fight, the BBC reports.
The government dropped its reluctance to combat IS militants directly after the release of 46 hostages last month.
The Turkish citizens had been held by IS in northern Iraq.
However, Turkey still remains wary of retaliation by IS and also fears helping Kurds, who are fighting the militants. Turkey has fought a long civil war with its Kurdish minority.
Porous border
Protesters demonstrated outside parliament as the debate began but the motion was passed with 298 MPs in favour and 98 against.
It provides a legal framework for the Turkish military to launch incursions into Syria and Iraq against militants who threaten Turkey. It also allows for foreign troops to be stationed in Turkey as part of the same campaign.
The approval of the MPs could enable the US to use its large airbase at Incirlik in southern Turkey for air strikes against IS.
Asked what action Turkey might take now, Defence Minister Ismet Yilmaz told Associated Press news agency: "Don't expect any immediate steps."
Turkey has long been accused of permitting the flow of jihadists and resources into Syria as well as allowing IS to traffic oil from oilfields it has captured. The government in Ankara denies the allegations.
Turkey has a porous and vulnerable border with Syria, more than 900km long.
A recent United Nations report on Iraq has provided new evidence of what it calls a staggering array of human rights abuses by Islamic State militants.
The report is based on almost 500 interviews, and also says air strikes by Iraq's own forces against the Sunni militants have caused "significant'' civilian deaths.