Votes in Burma's first election for 20 years are being counted after a polling day marred by a low turnout and international criticism.

Many voters heeded opposition calls to boycott an election in which two military-backed parties running virtually unopposed were certain to prevail in a tightly controlled election to end 50 years of direct army rule. Barack Obama criticised the vote as "anything but free and fair".

The vote took place amid tight security and a ban on foreign reporters and election monitors. Despite the restrictions, the Guardian managed to visit 20 polling stations in the former capital, Rangoon. Many were empty throughout the day.

After polling closed, the official count was hampered by Burma's familiar power cuts. Election officials could be seen from the street at some polling stations poring over and debating ballots with party scrutineers.

There been no word on when the successful candidates and an overall winner might be announced. Some reports suggest it could be several days.

On the streets of Rangoon, life returned to normal. The police presence, so obvious during the day, was scaled back to usual levels, and many of the shops which closed for the day, reopened at night.

For the 10 hours of voting, police stood on almost every street corner, and the major booths, in the centre of the city, were ringed by barriers of barbed wire, and guarded by officers in body armour carrying assault rifles. Even the smallest suburban polling station had a contingent of police.

The Guardian saw only a handful of voters. In suburban areas polling station officials outnumbered electors. No election leaflets were being handed out and there were no posters for any party other than the government's.

At the last election in 1990, 80% of people voted. There was no sign of that enthusiasm today.

The banned opposition party, the National League for Democracy (NLD), led by Aung San Suu Kyi, which won the 1990 vote, had called on supporters to boycott the poll.

It is expected that the junta's political arm, the Union Solidarity and Development party, supported by its proxy party, the National Unity party whose candidates are mainly retired generals, will win comfortably, through sheer weight of numbers. Between them, the two parties fielded more than 2,100 of the 3,000 candidates. In 52 seats, the USDP is uncontested, and in more than 200, only pro-junta parties are standing. Opposition parties have been strongly outspent and the largest opposition party is fielding only 163 candidates.

Many of the parties are new, formed as the election was called, and have struggled to even come up with the $500 (£300) registration fee for each candidate. The USDP has poured tens millions of state dollars into its campaign.

Khim Maung Shwe, leader of the largest opposition party, the National Democratic Force – formed by former members of the NLD – said he was pleased with voter turnout, but that people in villages appear to be scared of voting for the opposition parties, matching local media reports of voter intimidation by the military in regional electorates.

Many people were also too scared to vote, fearing retribution for any vote for the opposition.

The British ambassador, Andrew Heyn, said people have been ordered to vote for the USDP. Writing in the Guardian, he said: "I have firsthand accounts of people who have been warned by local officials that if they don't vote for the USDP there will be trouble for them and their families."

But some voters did express defiance. "I cannot stay home and do nothing," said Yi Yi, a 45-year-old computer technician. "I have to go out and vote against the USDP. That's how I will defy them."

"I voted for the [democracy party] in 1990. This is my second time to vote," said a 60-year-old man, Tin Aung. He then looked around and added: "I am really scared."

The government was on alert for protests by those urging a boycott against the elections, warning that anybody caught encouraging others not to vote faced a prison sentence.

The Burmese people voted for representatives in a federal upper house (Pyithu Hluttaw) and lower house (Amyotha Hluttaw), as well as a regional parliament. Voters who belong to one of Burma's ethnic minorities could also vote for a representative from their ethnic group to sit in the regional parliament.

The NLD, itself now proscribed by the government, said the ballot would entrench military rule, particularly by bringing into force a new constitution which guarantees the army 25% of parliamentary seats, as well as key ministries.

In Moulmein, in the Mon state in Burma's south-east, voter turnout was quiet.

A spokesman for the All Mon Regions Democracy party told the Guardian he was not surprised people were reluctant to vote.

"I voted early this morning. It is my right as a citizen. But I think many will not. Many are not interested in politics. Some people are afraid if they don't vote for the government, they will be in trouble. They think better not to go."

The junta cancelled the election in parts of Burma controlled by ethnic minority armies, saying the areas were not safe for a poll. But the Mon party spokesman said some people in Mon state had travelled from "black area" villages to places where the election was being held, in the vain hope of casting a ballot.

Obama condemned the voting arrangements during his visit to India. He said: "For too long, the people of Burma have been denied the right to determine their own destiny."

In a strong intervention, William Hague, the British foreign secretary, said: "Holding flawed elections does not represent progress. For the people of Burma, it will mean the return to power of a brutal regime that has pillaged the nation's resources and overseen widespread human rights abuses, including arbitrary detentions, enforced disappearances, rape and torture."

The ambassadors representing the European Union, US, Britain and Australia all refused to take part in a government-organised tour of polling stations.

Despite the criticism, some experts on Burma said the election could herald a modicum of change.

"The elections, for all their farcical elements, have already achieved something: Burmese people are listening and talking more about politics than they have for a long time," said Monique Skidmore of the Australian National University.