BANGKOK (AP) — Thailand held nationwide elections without bloodshed Sunday despite widespread fears of violence. But the country's bitter political crisis is far from over, and one of the next flash points is likely to be an effort to nullify the vote.

Although balloting was largely peaceful, protesters forced thousands of polling booths to close in Bangkok and the south, disenfranchising millions of registered voters. Not all Parliament seats will be filled as a result, meaning the nation could stay mired in political limbo for months with the winning party unable to form a new government.

The struggle to hold the vote was part of a 3-month-old conflict that has split the country between supporters of Prime Minister Yingluck Shinawatra and protesters who allege her government is too corrupt to rule.

The crisis, in which demonstrators have occupied major intersections across Bangkok and forced government ministries to shut down and work elsewhere, overshadowed the poll's run-up to such an extent that campaigning and stump speeches laying out party platforms were virtually non-existent.

Rather than "a contest among candidates, it was about whether the election itself could happen," said Sunai Phasuk of Human Rights Watch. "That in itself says a lot about the fate of democracy in Thailand — it's hanging by a thread."

Television stations, which normally broadcast electoral results, were reduced to projecting graphics not of party victories and losses, but of which constituencies were open or closed.

Official results cannot be announced until a series of by-elections are held and all districts have voted. The first will take place Feb. 23.

In Bangkok, protesters surrounded government offices housing ballot papers, preventing them from being delivered. They also pressured electoral officials not to report for duty, and in some cases physically preventing people from voting.

Infuriated voters cut the chains off polling stations that had been locked, futilely demanding that they be allowed to cast ballots. In one downtown district, they hurled bottles at each other and one demonstrator fired a gunshot after several people tried to push past a blockade. After authorities called off voting there, angry crowds stormed into the district office.

"We want an election. We are Thais," said Narong Meephol, a 63-year-old Bangkok resident who was waving his voter identification card. "We are here to exercise our rights."

Ampai Pittajit, 65, a retired civil servant who helped block ballot boxes in Bangkok, said she did it "because I want reforms before an election."

"I understand those who are saying this is violating their rights," he said. "But what about our right to be heard?"

The Election Commission said poll closures affected about 18 percent of the country's 48 million registered voters, although many of them may not have cast ballots anyway following a boycott by the opposition Democrat party, which is calling for political and economic reform first.

The protesters want to suspend democracy and are demanding the government be replaced by an unelected council that would rewrite political and electoral laws to combat deep-seated problems of corruption and money politics. Yingluck has refused to step down, arguing she is open to reform and such a council would be unconstitutional.

Yingluck called Sunday's vote after dissolving Parliament in December in a failed bid to defuse the crisis. Protests intensified, and Yingluck — now a caretaker premier with limited power — has found herself increasingly cornered. Courts have begun fast-tracking cases that could see her party removed from power, while the army has warned it could intervene if the crisis is not resolved peacefully.

Fears of violence Sunday rose after a dramatic gunbattle erupted in broad daylight Saturday at a major Bangkok intersection between government supporters and protesters who were trying to block delivery of ballots. Seven people were wounded.

Late Sunday, gunmen opened fire on several vehicles that mistakenly drove onto an empty overpass in the city center controlled by demonstrators who have blocked the road off with a large sand-bagged bunker. The shooting, which shattered one vehicle's windshield and left bullet holes in another, wounded a man and a woman, according to the city's emergency services.

The protesters are a minority that cannot win through elections, but they comprise a formidable alliance of opposition leaders, royalists, and powerful businessmen who have set their sights on ousting the government. They have waged that fight successfully before — by ousting Yingluck's brother, former premier Thaksin Shinawatra, in a 2006 army coup, and by forcing two Thaksin-allied prime ministers who followed to step down through controversial legal rulings.

Most now believe another so-called "judicial coup" will bring the government down.

Analysts say the courts and the country's independent oversight agencies all tilt against the Shinawatra family, and Yingluck's opponents are already studying legal justifications to invalidate Sunday's vote.

Protest leader Suthep Thaugsuban publically assured followers the ballot will be nullified, and Verapat Pariyawong, an independent Harvard-educated lawyer, said there was "no doubt" the Constitutional Court will end up hearing a case to annul it.

But he said it would be "absurd" to expect judges to "to stay strictly within the limits of the law ... (because) history has shown that this court is willing to play politics from the bench."

If the ballot is nullified, Verapat said there will be "more blood on the streets," a reference to the expectation that government supporters in the north are unlikely to sit idle.

Before Thaksin was deposed in 2006, the Constitutional Court nullified a similar vote won by his party about one month after it had taken place. The ruling was based partly on the argument that the positioning of ballot booths had compromised voter privacy.

Chuvit Kamolvisit, an independent candidate who served as a lawmaker until Parliament was dissolved two months ago, called the crisis gripping Thailand "a game of power" and accused Suthep and his supporters of falsely characterizing their struggle as an anti-corruption fight.

Graft "has been a part of Thai society for a long time," said Chuvit, who made a fortune operating massage parlors that doubled as brothels before turning to politics. "It's a real problem, but now it's being used an excuse for politicians to take power."

Suthep was a lawmaker for more than three decades, he said, "and what did he do to end corruption in all that time?"

The burly, outspoken Chuvit was one of many in the capital who were unable to cast ballots Sunday. He was physically assaulted by a group of protesters in confrontation that devolved into a knock-down brawl.

"I have to protect my rights," Chuvit said. "Thai society has to learn that to get rights, freedom, liberty, you need to fight. But the fight should take place within the democratic system, not on the street."

___

Associated Press writers Thanyarat Doksone, Jocelyn Gecker and Jinda Wedel contributed to this report.