Cambodian Prime Minister Hun Sen, right, shakes hands with the main opposition party leader Sam Rainsy, left, of Cambodia National Rescue Party, as Deputy Prime Minister Sar Kheng, center, smiles after their meeting in Senate headquarters in Phnom Penh, Cambodia, Tuesday, July 22, 2012. Hun Sen and opposition leader Rainsy said Tuesday that they had agreed upon a joint political solution to end the crisis. (AP Photo/Heng Sinith)
Cambodian Prime Minister Hun Sen, center, enters a car after a meeting in Senate headquarters in Phnom Penh, Cambodia, Tuesday, July 22, 2012. Leaders of Cambodia's ruling and opposition parties say they have reached an agreement to end a political deadlock since last year's contentious election. (AP Photo/Heng Sinith)
PHNOM PENH, Cambodia — Cambodia's yearlong political deadlock appeared to be resolved Tuesday as Prime Minister Hun Sen and his rivals agreed on political reforms and the opposition agreed in turn to end its boycott of parliament.
Hun Sen, Cambodia National Rescue Party leader Sam Rainsy and colleagues met in their third round of formal talks since opposition lawmakers boycotted their parliamentary seats following last July's general election. The opposition alleged that the polls were rigged, and demanded reforms and new, early polls.
"It was a success. Now you can applaud," said Hun Sen, who was smiling as he walked out of the meeting room.
"We have no choice. The only suitable choice is to end the political crisis, to end the standoff," Rainsy told reporters.
In a concrete sign of goodwill, seven opposition lawmakers and another party activist who were detained last week for insurrection were released on bail a few hours after the talks, said their lawyer, Sam Sok Kong. The eight were arrested after violence broke out when party members attempted to stage a rally at Phnom Penh's Freedom Park.
Hun Sen has been in power for almost three decades and, despite Cambodia being formally democratic, his government is authoritarian and known for intimidating opponents. The strong showing by Rainsy's party in last year's elections posed the strongest challenge to Hun Sen in years.
Rainsy said the two leaders must seek an audience with King Norodom Sihamoni to inform the monarch about the agreement before the 55 lawmakers-elect from his party are sworn in and join the National Assembly. Hun Sen's Cambodian People's Party holds 68 seats.
A joint statement said the parties agreed to work together to solve important issues and to reform some institutions.
"Both parties agreed to carry out the reform and strengthening of some major state institutions, especially independent institutions that could serve the benefit of the nation and the people and comply with pluralist democracy," they said in the statement. The opposition had been particularly concerned with the state election body, which it felt failed to operate fairly and efficiently.
In terms of the legislature's leadership, the two sides agreed that the president and second vice president of the National Assembly would be from the ruling Cambodian People's Party, and that the first vice president would come from the opposition CNRP.
Each party will chair five out of 10 commissions in the assembly, according to the statement. No other parties hold any legislative seats.
Both parties also said they agreed to change the dates of upcoming elections, but did not say when they would be held. They had disagreed on the dates when a preliminary agreement was first announced in April. The next general election is scheduled for July 2018.