SANA, Yemen — After five months of war in which more than 4,000 people have been killed, Yemen’s government, exiled in Saudi Arabia, faces a fateful decision: leverage recent battlefield gains to negotiate a cease-fire with a weakened Houthi rebel movement, or try to rout the rebels once and for all.

Backed by air support and ground troops from Persian Gulf nations, fighters allied with the government have made significant progress in recent weeks, after Saudi Arabia and the United Arab Emirates poured men and matériel into the strategic southern port city of Aden. The Houthis were driven from the city in July and since then have suffered a string of defeats in southern and central Yemen.

Yemen’s ambassador to the United Nations struck a bullish note last week, predicting that the government and allied forces would be ready to take back Sana, the capital, within weeks.

“It seems they are on the run,” the ambassador, Khaled Alyemany, said of the Houthi militias after a meeting with members of the United Nations Security Council on Wednesday. “My feeling is it’s going to be weeks before we can liberate the entire country from the coup,” he said, referring to the government’s forced resignation at the hands of the rebels in February.