Egyptian President Abdel Fattah el-Sisi has ordered his army to be ready to carry out any mission inside or outside the country to protect its national security amid tensions over Turkey's intervention in neighbouring Libya.
He also warned forces loyal to the internationally recognised Government of National Accord (GNA) in Tripoli not to cross the current front line with renegade military commander Khalifa Haftar's eastern-based self-styled Libyan National Army (LNA).More: Libya: Haftar's forces 'slow down' GNA advance on Sirte What's behind GNA's decision to launch offensive to seize Sirte? UN says Libya's warring parties engaged in 'productive' talks
Turkey supports the GNA, which, with Turkish support, has reversed a 14-month assault on the capital by the LNA.
The LNA is backed by Russia, the United Arab Emirates and Egypt.
El-Sisi on Saturday toured an airbase near Egypt's 1,200km-long (746 miles) western border with Libya, where state television showed him watching fighter jets and helicopters taking off.
"Be prepared to carry out any mission, here inside our borders - or if necessary, outside our borders," he told air force pilots and special forces personnel at the base.
He said the Egyptian army was "one of the strongest in the region", adding: "It is a rational army; an army that protects and does not threaten ... this is our strategy, our beliefs and our principles that we will never change."
He also said Egypt did not want to intervene in Libya and generally favoured a political solution, but added that "the situation now is different".
"If some people think that they can cross the Sirte-Jufra front line, this is a red line for us," he said before an audience that included some Libyan tribal leaders.
"If the Libyan people moved through you and asked us to intervene, this would be a signal to the world that Egypt and Libya are one country, one interest," he added.
Fighters loyal to the GNA have recently reversed Haftar's advance on the capital, Tripoli [File: EPA]Turkey urges Haftar withdrawal
Meanwhile, Turkey said on Saturday that Haftar's forces in eastern Libya needed to withdraw from the strategic city of Sirte for a lasting ceasefire.
Ibrahim Kalin, the presidential spokesman, told the AFP news agency that Sirte and Al-Jufra should be evacuated by Haftar's forces for a "sustainable ceasefire".
Kalin said a ceasefire in Libya would be possible if everybody went back to their positions in 2015, referring to an agreement reached that year.
He warned against a rushed truce, saying: "A rushed, premature ceasefire will not lead to what we want to achieve for all Libyans there."
Earlier this month, Egypt called for a ceasefire in Libya as part of an initiative which also proposed an elected leadership council for the country.
The United States, Russia and the UAE welcomed the plan. Germany said United Nations-backed talks were key to the peace process.
However, Turkey dismissed the proposal as an attempt to save Haftar following a string of losses on the battlefield.
Libya has been mired in chaos since a NATO-backed 2011 uprising toppled longtime leader Muammar Gaddafi only to leave rival militias fighting for control of the country's oil wealth and drawing in international powers as the conflict has ebbed and flowed.