By Sylvia Westall and Mahmoud Harby
KUWAIT (Reuters) - A prominent Kuwaiti opposition politician convicted of insulting the ruling emir was granted bail on Monday, his lawyer said, prompting celebrations by supporters packing the court building and defusing tensions in the oil-exporting Gulf state.
Kuwait, a U.S. ally, has avoided a mass Arab Spring-style uprising but unrest flared last year after the emir changed the electoral law before a parliamentary election, a move opposition figures said was meant to deny them a parliamentary majority. The opposition boycotted the December 1 election.
Musallam al-Barrak, an outspoken former member of parliament, was accorded bail from his sentencing to five years in jail last week for remarks made at a rally last year.
The jail sentence triggered a series of street protests that underscored increasing friction between opposition figures and the government, headed by a prime minister picked by the emir.
"Today the popular movement had a victory, today the people had a victory and tomorrow the constitution will have a victory," Barrak told a crowd awaiting him outside the heavily-guarded court in the burning midday sun after the hearing.
"Today I see that the popular movement will achieve its goals," he said, smiling and looking calm, after chanting supporters hoisted him on their shoulders and carried him through the court gates.
Hundreds of Barrak's backers crammed into the court building after the ruling, cheering, whistling and chanting: "The people want Musallam al-Barrak," and "God is great".
"(This) will ease tension," former opposition lawmaker Khaled al-Tahous said outside the court building where police and national guard members watched the jubilation of Barrak's faithful.
His five-year sentence was not overturned on Monday, defence lawyer Dokki al-Hasban told Reuters.
But the court ruled that Barrak should be granted bail, on a payment of 5,000 dinars ($17,600), and that his defence team would have a chance to argue his case next month.
His defence had argued that last week's verdict was invalid because they had not been allowed to call witnesses.
Barrak, a populist politician who draws support from some of Kuwait's powerful tribes, was not taken into custody after his sentencing.
Security forces had searched his guesthouse and a neighbouring home last week but failed to find him, supporters said. It was not clear why police had not taken him into custody during subsequent speeches at the guesthouse.
Barrak, who has emerged as a quasi-opposition leader in a country were political parties are banned, was found guilty of insulting Sheikh Sabah al-Ahmed al-Sabah in a speech in October last year in which he urged the emir to avoid "autocratic rule".
The government said voting rules were amended to bring Kuwait's electoral system in line with others elsewhere.
While Kuwait allows more freedom of speech than other Gulf Arab states, the emir has the last say in state affairs and is deemed "immune and inviolable" in the constitution. He is shielded from public criticism by the penal code.
There has been a series of trials in Kuwait in recent months involving opposition activists accused of insulting the emir, mainly on social media.
International rights groups have called on Kuwait to drop the cases, saying they violate freedom of speech. Kuwait's government says authorities need to implement the law.
($1 = 0.2849 Kuwaiti dinars)
(Editing by Mark Heinrich)