BENGHAZI, Libya (AP) -- Militias in western Libya vowed Friday to confront a rival army commander's attempt to seize the capital, Tripoli, raising fears of renewed civil war in the oil-rich nation as the U.N. chief shuttled between the two sides, seeking to avert a major confrontation.
The escalation comes after forces of Khalifa Hifter, who runs the self-styled Libya National Army that is based in the country's east, pushed westward, bringing them closer to rival militias, which control Tripoli.
A showdown between Hifter's army and the militias could plunge Libya into another spasm of violence, possibly the worst since the 2011 civil war that toppled and later killed longtime dictator Moammar Gadhafi.
It would also put at risk upcoming peace talks between Libyan rivals brokered by the U.N. and aimed at drawing a roadmap for new elections. Those talks are due April 14-16.
The U.N. Security Council scheduled an emergency closed-door meeting on Friday afternoon at Britain's request to discuss the unfolding developments.
Hifter's troops on Thursday captured the town of Gharyan, some 50 kilometers (31 miles) south of Tripoli without a fight, putting them closer to the militias than ever before.
Hifter then ordered his forces to march on the capital, saying in an audio recording posted online: "We are coming Tripoli, we are coming." He also urged his forces to enter the city peacefully and only raise their weapons "in the face of those who seek injustice and prefer confrontation and fighting."
Hifter's spokesman Ahmed al-Mesmari said later the army's next stop would be the town of al-Aziziya, considered the gates of Tripoli.
In response, the militias from the western cities of Zawiya and Misarata, which control Tripoli, posted on social media early Friday that they're mobilizing to confront Hifter.
"We are the revolutionaries and the elders ... we declare we are on full mobilization and war," they said.
The prospect of a renewed fighting comes as U.N. Secretary General Antonio Guterres is visiting Libya. Early Friday, Guterres posted that he's flying from Tripoli to the east. It's unclear if he will be meeting with Hifter, who is based in the eastern city of Benghazi.
On Thursday, Guterres appealed for "military and political and verbal de-escalation — and the recognition that ... there is no military solution for the problems in Libya."
"My aim remains the same: avoid a military confrontation," he said Friday on Twitter. "I reiterate that there is no military solution for the Libyan crisis, only a political one."
Since Gadhafi's ouster, Libya has been split between rival governments in the east and west and an array of militias fighting over power and oil fields.