The fall of Surt comes as foreign powers intensify their involvement in the conflict, escalating the battle for control of the country.
Libyan rebels have seized control of a key coastal city, the country’s beleaguered government conceded on Tuesday, amid new criticism that the growing role of foreign powers in the chaotic conflict has fueled a sudden escalation in fighting.
Forces loyal to the militia leader Khalifa Hifter swept into the city, Surt, on Monday, days after Turkey announced that it was deploying troops to prop up the weak United Nations-backed government.
The fall of Surt is a significant blow to the government, which has been under siege from Mr. Hifter’s forces since April.
In 2016, American warplanes carried out hundreds of airstrikes against Islamic State fighters in Surt, in support of a government force that eventually expelled the group from the city. Now that the government has relinquished that gain, this time to Mr. Hifter’s forces, its authority has shrunk to a 250-mile strip of coastline stretching from either side of the capital, Tripoli.
If Mr. Hifter can hold Surt, analysts say, his forces could stretch government forces even thinner by drawing fighters away from the defense of Tripoli.
Mr. Hifter, 76, commands his self-styled Libyan National Army from his stronghold in Benghazi, in eastern Libyan. In a country with a bewildering array of rival militias, Mr. Hifter has emerged in recent years as the main challenger to the Tripoli government.
A variety of regional powers has lined up in support of Mr. Hifter, drawn by his anti-Islamist stance and an authoritarian style that some believe make him a potential leader of Libya. Critics call him a ruthless tyrant intent only on wielding power.
Mr. Hifter easily captured Surt on Monday after persuading a local militia to switch sides. But for the most part, his recent gains have been bolstered by the foreign allies that are increasingly dictating the pace and shape of Libya’s war.
In the battle for Tripoli, Mr. Hifter’s forces have been backed by Russian mercenaries and Emirati warplanes and drones, as well as support from Egypt, Jordan and France.
President Recep Tayyip Erdogan of Turkey has become the Tripoli government’s last major patron, providing armed drones, armored vehicles and, in the past week, Turkish troops.
Turkish officials say their troops will act mostly in an advisory role and avoid front-line combat. But there are indications, from American officials and from videos posted on the internet, that Ankara has deployed Syrian irregulars to Libya, drawn from units that fought the Kurds in northeastern Syria last year.
The increasingly prominent foreign role drew an angry rebuke from the United Nations envoy to Libya, Ghassan Salamé, who told reporters on Monday that “probably thousands” of foreign mercenaries had arrived in Libya to participate in the fight.
The battle has displaced 300,000 people and caused over 2,200 deaths.
Mr. Salamé blamed one of Mr. Hifter’s foreign backers — he didn’t specify which one — for a drone strike on a government military facility near Tripoli on Saturday that killed 30 unarmed military recruits. His message to every foreign power mired in the conflict, he said: “Get out of Libya.”
In Brussels on Tuesday, the foreign ministers of Britain, Germany, France and Italy, as well as Josep Borrell, the foreign policy chief of the European Union, issued a joint statement condemning the “continuing outside interference” in the conflict.
Mr. Borrell singled out Turkey for criticism.
“We asked for a cease-fire and we asked also to stop escalation and external interference, which has been increasing in the past days,” he told reporters. “It is obvious that this makes a reference to the Turkish decision to intervene with their troops in Libya.”
Located about halfway along Libya’s Mediterranean coastline, Surt has long straddled the geographic and political fault lines that divide eastern and western Libya, said Frederic Wehrey, a Libya specialist at the Carnegie Endowment for International Peace.
Mr. Hifter’s capture of Surt could have major strategic significance, Mr. Wehrey said. It could draw fighters away from Tripoli, especially Misuratans who may seek to defend their city or participate in a counteroffensive in Surt.
And it appears to signal that at least some groups have agreed to throw their lot in with Mr. Hifter. The militia that controlled Surt includes many fighters from Mr. Hifter’s Ferjan tribe, Mr. Wehrey noted, although the decision to switch sides was more likely made for opportunistic reasons.
“Hifter is escalating, both in geographic scope and in the intensity of his strikes,” Mr. Wehrey said. “Now some groups are calculating that it’s in their interest to side with him.”
Surt is the birthplace of Libya’s longtime dictator, Col. Muammar el-Qaddafi, whose ouster in 2011 plunged the oil-rich country into a state of mayhem that has dramatically worsened in recent years. The Islamic State captured Surt in 2015, only to be ousted from the city a year later by pro-government Libyan forces backed by American airstrikes and military support.
Since then, the city has been controlled by a pro-government force dominated by conservative Salafist fighters and members of Mr. Hifter’s Ferjan tribe. On Monday a large portion of that force suddenly switched sides and allowed Mr. Hifter’s forces to march in.
“There was almost no fighting,” said Emadeddin Badi, a Libya scholar at the European University Institute in Florence.
On Tuesday the Tripoli government, blaming pro-Hifter “sleeper cells” inside Surt, said it had voluntarily withdrawn its forces to avoid bloodshed. But the loss caused consternation in Misurata, a coastal city 130 miles to the west whose fighters are the linchpin of government efforts to defend Tripoli.
Turkish troops arriving in Libya are expected to land in Misurata, and on Tuesday its leaders said they were mustering a military force to try to retake Surt.
“We are preparing for a counteroffensive,” said Mohamed al-Qunaidi, a former head of military intelligence for the Tripoli government, who comes from Misurata.