Yemeni President Ali Abdullah Saleh on Tuesday threatened government opponents with civil war and appealed to them to begin a national dialogue in conflicting statements that did not stop calls for his immediate resignation.

The mood in the capital, Sanaa, was tense amid reports that opposing military units, some supporting Saleh and some backing recently defected military commanders, had faced off in skirmishes around the country.

The United States and Saudi Arabia, with strong vested interests in Yemen’s ongoing counterterrorism cooperation, worked behind the scenes to promote a solution, but made no public expressions of support for Saleh, who has been in power for 32 years.

“We continue to consult with our regional partners, including Saudi Arabia, about the situation in Yemen,” an Obama administration official said, declining to comment further. The White House has had no direct contact with Saleh since a call made Sunday by John O. Brennan, President Obama’s chief counterterrorism adviser.

Defense Secretary Robert M. Gates told reporters traveling with him in Moscow that it was “not my place” to comment on events in Yemen. “We are obviously concerned about instability” there, he said, describing the focus of U.S. worry as a possible “diversion of attention” from the threat posed by the al-Qaeda offshoot in Yemen.

According to news wire reports and Internet postings by Yemenis, Saleh’s army repelled an attack by al-Qaeda in the Arabian Peninsula on a military position east of Lawdar, a city in the southern part of the country, killing 12 militants and injuring five. Armed militants have been on a rampage in the southern city of Aden, breaking into nightclubs, throwing out patrons and setting fire to buildings, the Associated Press reported.

Clashes were also reported in the north between pro-revolution Houthi rebels and tribes loyal to the government.

Six weeks of largely peaceful protests against Saleh appeared to reach a tipping point Monday, when dozens of senior military officials, diplomats and government officials resigned to protest the killing Friday of more than 50 demonstrators by government snipers.

“Friday broke our hearts; yesterday opened our eyes,” said Mohammed al-Basha, who has not resigned his position as spokesman for the Yemeni Embassy in Washington but described himself as a “neutral”civil servant.

“We saw people of our generation killed with head shots and chest wounds,” he said. “We don’t want that pain again.”

In a meeting with military and tribal leaders late Monday night, Saleh agreed to a plan under which he would leave office at the end of the year. He had initially dismissed the proposal when it was advanced weeks ago by a coalition of opposition political parties that joined with the youthful and civil society protesters, and the opposition Tuesday told him it was no longer on the table.

“We reject Saleh’s offer to step down, and we tell him that the next couple of hours will be decisive for his regime,” Mohammed Qahtan, a spokesman for an opposition political bloc, said Tuesday.

Maj. Gen. Ali Mohsen al-Ahmar, the powerful commander of Yemen’s northwest military district, who was the most prominent defector Monday, called on Saleh to resign to save the country from disaster. “The military is the property of the people and its protector,” Mohsen said. “It does not work for any specific person.”

In a televised speech to his National Defense Council, Saleh vacillated between threats of a “bloody” civil war and appeals for dialogue. In an apparent effort to split the opposition, he warned that youthful protesters would be victimized by the political factions that have joined them.

To military defectors, he said: “Those who want to reach power through coups should know what they are seeking is impossible.”

Late Tuesday evening, a government spokesman reiterated Saleh’s calls for “direct and transparent dialogue” with Yemeni youth.

The opposition political groups, called the Joint Meeting Parties, denied fears expressed on the street that they or the military were interested in a deal with Saleh. “Civil society youth are now controlling politicians, military and the tribes,” Qahtan said. “Military commanders will not steal the revolution from the people.”

Ali Amrani, the leader of a bloc of politicians who have left the ruling General Peoples Congress party over the past month, said that Saleh must leave but did not rule out an exit strategy agreed to by all sides, including Saleh and his remaining backers, to avoid chaos.

“Those with the revolution have numerous ideological differences,” he said, “and we need to make sure that the sides don’t start disputes immediately at the fall of Saleh.”

The protesters are suspicious of Mohsen’s motives, said Gregory Johnsen, a Yemen expert at Princeton University. “But at the same time, they’re willing to make a deal for the moment to get rid of Saleh.”

Mohsen, a longtime ally of the president and the most powerful military figure in the country, “is taking advantage in order to ensure for himself a position in a post-Saleh government,” Johnsen said.

Special correspondent Hakim Almasmari in Sanaa and staff writer Craig Whitlock, traveling with Gates, contributed to this report.