Dozens of gunshots and at least two explosions raised tension amid anti-government protests in Thailand's capital yesterday, ahead of a general election today that is seen as incapable of restoring stability in the deeply polarised country.

Six people were wounded in front of a suburban shopping centre in the north of Bangkok. Gunmen among the crowds were seen hiding their weapons before backing away from the shooting.

Sporadic gunfire continued as the sun began to set, with masked men firing handguns. Security forces fired warning shots in the air with M-16s to allow at least a dozen protesters taking cover to escape.

"Authorities were able to control today's clashes quickly and the situation has improved now," said National Security Council chief Paradorn Pattantabutr.

It was not immediately clear whether those wounded were the government supporters or opponents, some of whom want to block balloting in an election almost certain to return prime minister Yingluck Shinawatra to power.

The violence came amid generally peaceful protests around Bangkok and revived chilling memories of unrest in 2010, when supporters of former premier Thaksin Shinawatra, Yingluck's brother, paralysed Bangkok to remove a government led by the Democrat Party. More than 90 people were killed and at least 2000 wounded when current protest leader Suthep Thaugsuban - at the time a deputy prime minister - sent in troops.

Yesterday's attack took place in Bangkok's Laksi district, close to the Don Muang airport, a stronghold of Yingluck's Puea Thai Party. Her supporters had gathered to demand that today's ballot not be obstructed.

Ten people have died and at least 577 have been wounded in politically related violence since late last year. The protesters took to the streets in November for the latest round of an eight-year conflict. On one side are Bangkok's middle class, southern Thais and the royalist establishment, and on the other the mostly rural supporters of Yingluck and Thaksin, who was ousted in 2006.

Suthep has called for a peaceful blockade of roads, but at the same time has vowed not to stop people voting. He said: "The people will not close the polling booths, but will demonstrate on the roads. They will demonstrate calmly, peacefully, without violence … We won't do anything that will hinder people from going to vote."

Election Commission secretary-general Puchong Nutrawong said the commission had instructed staff to halt voting if there was rioting or other violence, adding: "We don't want this election to be bloody. We can get every single agency involved to make this election happen, but if there's blood, what's the point? … If there is continued obstruction, I pray only that there is no fighting and no coup."

The military has stayed firmly on the sidelines so far, in contrast to the past. It has a history of having staged or attempted 18 coups in 81 years of on-off democracy.

Yingluck's party is bound to win the election, though without enough members to achieve a quorum in parliament - guaranteeing further stalemate, at best.

The Democrat Party is boycotting Sunday's poll and backs the protests.