Media playback is unsupported on your device Media caption Eyewitness Nick Nostitz: "There were moments when I thought I'm not going to survive it"

At least six people have been injured in gun battles in Bangkok between government opponents and supporters, a day before Thailand's general election.

Journalists and members of the public raced for cover as protesters with handguns and rifles traded fire.

The demonstrators, who want Prime Minister Yingluck Shinawatra to quit, were trying to blockade a building where ballot papers are being stored.

The main opposition Democrat Party is not standing in the election.

The Democrats, allied to the protesters, have been unable to win an electoral majority for two decades.

They want the government to be replaced by an unelected "people's council", which would oversee wide reform of the political system.

At the scene For most of the day the atmosphere in the northern Bangkok suburb of Laksi was tense, but calm. The 200 or so protesters blockading a building to prevent the distribution of ballot papers were aware that, a short distance away, a group of government supporters of about equal number, were gathering to protest against the obstruction of the election. We spoke to the leaders on both sides. They insisted that their intentions were peaceful. But by late afternoon gunfire was being exchanged, sending journalists and bystanders scattering for cover. From a safe distance away we could hear sporadic bursts from handguns and automatic weapons, lasting for a couple of hours or so. It eventually died down, the injured were taken to hospital and security forces appeared to have secured the area. The violence was intense and, although localised, it gives a glimpse of the potential for this election to descend into chaos.

Demonstrators accuse the prime minister of being under the control of her brother, ousted former leader Thaksin Shinawatra, who lives in self-imposed exile.

Troops deployed

Saturday's shooting incident took place in Bangkok's Laksi district, a stronghold of the prime minister's Pheu Thai party.

Sustained bursts of gunfire ricocheted off buildings after a tense stand-off between both sides, the BBC's Jonathan Head, in Bangkok, reports.

There was no word on who was responsible. It was also unclear whether those struck were government supporters or opponents.

One man is reported to be in a serious condition after being shot in the neck.

The Electoral Commission said voting would be called off in Laksi because officials had been unable to get past the protesters to collect the ballot papers.

Media playback is unsupported on your device Media caption Thailand's crisis explained in 60 seconds

The opposition movement - whose supporters are known as "yellow shirts" - has vowed to disrupt the election as much as possible, by preventing ballot papers from reaching polling stations.

They are expected to be able to seriously disrupt voting in the south and in Bangkok, areas of which are strongholds of the opposition.

In pro-government areas in the north and east, voters are likely to be able to vote without problems.

Thailand's troubles Sep 2006: Army ousts Thaksin Shinawatra

Army ousts Thaksin Shinawatra Dec 2007: Pro-Thaksin party wins election

Pro-Thaksin party wins election Aug 2008: Thaksin flees Thailand

Thaksin flees Thailand Dec 2008: Huge anti-Thaksin protests; court bans ruling party; Abhisit Vejjajiva comes to power

Huge anti-Thaksin protests; court bans ruling party; Abhisit Vejjajiva comes to power Mar-May 2010: Huge pro-Thaksin protests; dozens killed in army crackdown

Huge pro-Thaksin protests; dozens killed in army crackdown Jul 2011: Yingluck Shinawatra, sister of Thaksin, elected PM

Yingluck Shinawatra, sister of Thaksin, elected PM Nov 2013: Anti-government protests

Anti-government protests Dec 2013: Ms Yingluck calls election

Ms Yingluck calls election Jan 2014: Ms Yingluck declares state of emergency The battle for Thailand's soul Q&A: Thailand protests

Meanwhile pro-government groups - or "red shirts" - have been ordered to monitor the poll, but not confront the protesters, for fear that violence would jeopardise the election.

The army earlier said it would increase the number of troops deployed in Bangkok for the polls on Sunday. Some 10,000 police will also patrol the streets.

Abuse of power

The protests began in November, after the lower house backed a controversial amnesty bill that critics said would allow Ms Yingluck's brother to return.

Thaksin Shinawatra was ousted in a military coup in September 2006, accused of corruption and abuse of power.

He faces a two-year jail sentence if he returns to Thailand, after being convicted in absentia on a conflict-of-interest charge.

Ms Yingluck called early elections to quell the unrest, but demonstrators have vowed to block the poll from going ahead.

Image copyright Reuters Image caption Journalists and passers-by sought cover while shots were being fired in Laksi district, a government stronghold

Image copyright AP Image caption Before the exchange of fire, demonstrators were filmed attacking a car

Image copyright AFP Image caption Protesters have vowed to disrupt the election on Sunday as much as possible

Image copyright AP Image caption Anti-government groups have been blockading buildings where ballot papers are being held

Correspondents say one election commissioner has predicted that 10% of polling stations will not be able to open at all on Sunday.

Because of disruption to candidate registration, the elections will also not deliver enough MPs for a quorum in parliament, meaning that by-elections will be needed before a government can be approved, extending the instability.

Last week, there were chaotic scenes as protesters tried to stop advance voters from casting their ballots.