(CNN) -- Yemen's embattled president told the country's largest opposition bloc he would step down at the beginning of next year, a ruling party official told CNN.
The opposition rejected the offer, demanding that Ali Abdullah Saleh resign immediately.
Saleh pushed back against opponents including some of his own top generals Tuesday, defying calls for him to quit.
"Those who want to reach power through a coup will be unable to. This is impossible. The scenario will turn into a civil war," Saleh said in a televised speech.
"There is a constitution, and there are rules. There is the will of the people. It is impossible for a minority to control the fate of the nation," he said.
Also Tuesday, Yemen's army repelled an attack on a military position by al Qaeda in the Arabian Peninsula, killing 12 militants and wounding five, a Yemeni official told CNN, citing sources at the Interior Ministry in Sanaa.
The official, who spoke on condition of not being named because he is not authorized to talk to the media, said the attack occurred east of the city of Lawdar, in Abyan province in southwest Yemen.
Saleh, who has been in power for 32 years, has been a key U.S. ally as al Qaeda turns his country into a base.
It is not clear when Saleh made his offer to step down in 2012 to the opposition JMP bloc, the largest opposition group, but they rejected his speech Tuesday.
"Any offer that does not include the president's immediate resignation is rejected," said Mohammed Qahtan, a JMP spokesman.
The president's defiant speech came a day after Saleh met a top general who announced he was supporting the protests that have been roiling Yemen since the beginning of the year.
Even officials in Saleh's own party expressed worries about the speech, which came on the heels of a particularly tense day in Yemen.
"It will cause more concern, and I think this will only increase the tension," ruling party official Mohammed Abulahoum told CNN.
"I hope that the military and the police and all units will not obey any order of any individual that asks them to point their guns at their people. After all, they are there to defend the people," he said.
Some government officials and others have declared their support for the opposition in the wake of a government crackdown on protesters that left 52 people dead last week.
On Tuesday, Rupert Colville of the United Nations Office of the High Commissioner for Human Rights expressed concern about the situation in Yemen.
The agency deplored the reported killings of protesters, including allegations of snipers shooting from rooftops, Colville told a news briefing in Geneva.
"All such violations of human rights must indeed be investigated by independent and impartial mechanisms," Colville said.
Saleh and Maj. Gen. Ali Mohsen Al-Ahmar on Monday discussed a deal for a peaceful transition of power that would allow Salehto to stay in place for the rest of the year, a Yemeni official and senior U.S. official said.
Then on Tuesday, Saleh appeared to criticize the powerful general and other officers who declared their support for the opposition on Monday, saying, "Any division in the military will have negative impacts on the whole country."
A government official said the speech was a warning to those who broke ranks.
"Saleh was sending a message to the generals who defected yesterday, telling them, you know you're going to come back, so why not come back now rather than trying to do so later?" said the official, who asked not to be named because of the sensitive situation.
Al-Ahmar, who belongs to an important tribe whose backing is significant for Saleh, said Monday he would order his troops to protect civilians demonstrating against the president.
A wave of other officials announced their support for the opposition Monday.
They included Yemen's ambassador to Britain and the embassy's entire diplomatic staff, as well as Yemen's ambassador to the European Union, Mohamed Jaffer.
U.S. Defense Secretary Robert Gates said Tuesday the United States was "obviously concerned about the instability in Yemen. We consider al Qaeda in the Arabian Peninsula, which is largely located in Yemen, to be perhaps the most dangerous of all the franchises of al Qaeda right now."
Radical American-born cleric Anwar al-Awlaki is believed to be hiding in the country.
The cleric has been linked to terror plots including the attempt to bomb a Detroit-bound plane on Christmas Day 2009, and he corresponded separately with a British Airways employee about trying to smuggle explosives onto planes.
Top American officials, including U.S. President Barack Obama's counterterrorism chief, have traveled to Yemen to meet with Saleh. Leaked diplomatic cables suggest Saleh's government helped disguise strikes by U.S. unmanned drones on terror targets in Yemen by calling them Yemeni actions.
CNN's Tracy Doueiry, Caroline Faraj, Elise Labott, Richard Roth, Pam Benson and Jo Shelley and journalist Hakim Almasmari contributed to this report.