(Recasts with court ruling)
* Govt had set Feb 2 election
* Election Commission says vote not possible due to turmoil
* Court tells govt, commission to agree election date
* Protesters in capital want government to step down
By Amy Sawitta Lefevre and Panarat Thepgumpanat
BANGKOK, Jan 24 (Reuters) - Thailand's Constitutional Court opened the way on Friday to delay a general election the government has set for Feb. 2, a ruling that could further drag out the country's political deadlock, already in its third month.
The Election Commission sought court approval to postpone the election, arguing that the country was so unsettled it would be impossible to hold a successful vote now.
Prime Minister Yingluck Shinawatra called the election last month in the hope of confirming her grip on power in the face of mass anti-government protests trying to force her from office.
The court ruling appeared to fudge a decision. While it gave the Election Commission the right to postpone the election, it also ruled that the commission would have to agree on a new date with the government.
The government has refused to accept a delay in the vote which it would almost certainly win and which the opposition says it will boycott.
Varathep Rattankorn, a minister at the prime minister's office, said the government wanted to read the full ruling before deciding what to do next.
One election commissioner, speaking to Reuters, said the vote could still go ahead on Feb. 2 if Yingluck's government dug in its heels.
"We will ask to meet with the prime minister and her government on Monday to discuss a new election date," election commissioner Somchai Srisuthiyakorn said. "If the government doesn't agree to postpone the election, then the election will go ahead."
He said that advanced voting for eligible voters could go ahead as planned on Sunday.
The government declared a 60-day state of emergency from Wednesday hoping to prevent an escalation in protests.
A leading pro-government activist was shot and wounded the same day in northeast Thailand, a Yingluck stronghold, in what police said was a political attack, adding to fears the violence could spread.
Nine people have died and dozens been wounded in violence, including two grenade attacks in the capital last weekend.
Anti-government firebrand and protest leader Suthep Thaugsuban, accusing the government of mass corruption, wants it to step aside and a "people's council" appointed to push through electoral and political changes.
He has yet to comment publicly on the court ruling.
The protests are the latest eruption in a political conflict that has gripped the country for eight years.
Broadly, it pits the Bangkok middle class and royalist establishment against the mainly poorer supporters of Yingluck and her brother, ex-premier Thaksin Shinawatra, who was toppled by the military in 2006.
FEARS OF ELECTION DAY VIOLENCE
On Wednesday, an unidentified gunman opened fire on Kwanchai Praipana, a leader of Thailand's pro-government "red shirt" movement and a popular radio DJ.
The attack in Udon Thani, about 450 km (280 miles) northeast of Bangkok, was the most significant violence outside the Thai capital and illustrates the risk that the turbulence plaguing Bangkok could spread to other areas of Thailand.
Just a day before, he had warned of a nationwide fight if the military launched a coup, as widely feared.
Several governments have warned their nationals to avoid protest areas in Bangkok, among the world's most visited cities. China called on Thailand to "restore stability and order as soon as possible" through talks.
So far the military, which has been involved in 18 actual or attempted coups in the past 81 years, has kept out of the fray. Police are charged with enforcing the state of emergency and are under orders from Yingluck to handle protesters with restraint.
The emergency decree gives security agencies powers to detain suspects, impose a curfew and limit gatherings but some analysts said it was in part designed to give Yingluck legal protection if police step in.
(Additional reporting by Apornrath Phoonphongphiphat; Writing by Jonathan Thatcher; Editing by Alan Raybould and Nick Macfie)