Mr. Erdogan, whose government has supplied armored vehicles and drones to the United Nations-recognized government of Libya, said in early December that his country might send troops, too. But as recently as Wednesday, when he met with Libyan and Tunisian officials in Tunis, he also said that Turkey would intervene only at the request of the government in Tripoli.

On Thursday, he said that a request had come and that Turkey’s Parliament, which his party controls, would consider it on Jan. 8 or 9.

“We do not go where we are not invited. Right now, there is an invitation that we will respond to,” Mr. Erdogan told a meeting of his governing party in Ankara, Turkey’s capital. “If God permits, as soon as the Parliament opens, as the first thing to do, we will present the deployment of troops resolution to our Parliament.”

It was unclear, though, whether the Libyan government actually had formally invited Turkey to send troops. Speaking in Tunis, Libya’s interior minister, Fathi Bashagha, told reporters on Thursday that the government would request help if the situation deteriorated further.

“If the situation escalates then we have the right to defend Tripoli and its residents,” Mr. Bashagha said, according to Reuters.