( CNN ) -- Yemen 's embattled president has accepted opposition demands for constitutional reforms and holding parliamentary elections by the end of the year , according to a statement issued by his office . The statement said President Ali Abdullah Saleh was `` committed to undertaking all possible initiatives to reach a settlement '' with the opposition JMP bloc and `` prevent any future bloodshed of the Yemeni people . '' According to the statement , Saleh `` has accepted the five points submitted by the JMP , including formation of a government of national unity and a national committee to draft a new constitution , drafting a new electoral law , and holding a constitutional referendum , parliamentary elections and a presidential vote by the end of the year . `` These accepted proposals have been submitted to the mediating party on the basis that this would end the current state of political turmoil facing the nation and paving the way for a smooth , peaceful and democratic transition , '' the statement from Saleh 's office said . There was no immediate reaction from the opposition , which previously has demanded Saleh 's immediate resignation . On Tuesday , a JMP spokesman rejected a report that Saleh was offering to step down by early 2012 . `` Any offer that does not include the president 's immediate resignation is rejected , '' JMP spokesman Mohammed Qahtan said . Saleh 's statement came on the same day that Yemen 's parliament approved a 30-day extension of emergency powers he declared last week in response to the protests . The emergency law expands the government 's powers of arrest , detention , and censorship . The president 's standing has weakened after some government officials and military officers declared their support for the opposition Monday in the wake of a crackdown on protesters that left 52 people dead last week . U.S. Secretary of State Hillary Clinton called Wednesday for full political dialogue in Yemen involving all players to find a peaceful solution . Saleh , who has been in power for 32 years , has been a U.S. ally in the fight against al Qaeda in the Arabian Peninsula , a terrorist network based in Yemen . `` The people of Yemen have the same rights as people anywhere , and we support dialogue as a path to a peaceful solution , '' Clinton said in Washington . Asked about putting any pressure on Saleh , Clinton said : `` We are certainly making our views known on both a regular and consistent basis , both publicly and privately . '' Yemen 's army repelled an attack Tuesday on a military position by al Qaeda in the Arabian Peninsula , killing 12 militants and wounding five , a Yemeni official said , 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 . The violence against opposition demonstrators last week drew international condemnation . Rupert Colville of the United Nations Office of the High Commissioner for Human Rights said Tuesday that the agency deplored the reported killings of protesters , including allegations of snipers shooting from rooftops . `` All such violations of human rights must indeed be investigated by independent and impartial mechanisms , '' Colville said in Geneva . Saleh and Maj. Gen. Ali Mohsen Al-Ahmar on Monday discussed a deal for a peaceful transition of power that would allow Saleh 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 . Other officials who announced their support for the opposition Monday 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 counter-terrorism 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 , Jo Shelley and journalist Hakim Almasmari contributed to this report .
NEW : Yemeni parliament extends emergency law for 30 days . President Saleh agrees to a new constitution and elections . The opposition previously rejected any plan without Saleh 's immediate ouster . Some government , military officials have joined the opposition .