The farmer and his wife spent two months scrambling to survive in the bloody final war zone of Sri Lanka's civil war, where up to 10,000 civilians died. They had scurried to avoid shellfire and scrabbled to find enough to eat and drink. They had buried the dead in the bunkers where they fell and then dug themselves another.

When the war ended, Velepule and his wife, Kanageswri, were taken to one of the sprawling refugee camps, with no option but to live in a blisteringly hot tent. A full nine months later, they – and as many as 100,000 Tamil civilians still being held – are wondering when they might finally be allowed to go home.

So when the polling booths near the camps opened yesterday morning, the couple had no hesitation in joining the long lines of people waiting to cast their vote in Sri Lanka's crucial presidential election. They had not the slightest hesitation, they said, because they were voting for change.

They were not alone. As thousands of refugees streamed out of the camps in northern Sri Lanka, pacing determinedly to the polling booth along the red-dust verges of a narrow tarmac road, it soon became clear that these people were casting their vote for Sarath Fonseka, the main challenger to the incumbent, Mahinda Rajapaksa.

Person after person, many shading themselves from the vicious sun beneath umbrellas, kept repeating the same Tamil words when asked for who or what they were voting: archi maththram or "change the government".

Two sisters, Jayaseen Kunawathi and Thangarasa Vanitha, had also spent weeks hiding in the war zone at Mullaitivu last spring as the forces of the Liberation Tigers of Tamil Eelam (LTTE) made a final stand against the government forces. Their father, a sister and some in-laws had died, and they had wondered whether they would survive, as they were forced to drink sea-water and stopped from leaving by the rebels.

They said Mr Fonseka had promised that the refugees would be released so they had voted for him, despite the fact that he had been the military mastermind of the government assault. "We need change," said one. It was that simple.

Up to 14 million Sri Lankans were registered to vote, and if the contest is as close as some believe then the votes of the country's Tamil population could prove decisive. The outcome of the contest is due to be announced later today.

Both candidates are members of the Sinhala Buddhist majority. Mr Rajapaksa, who has strong support in Sri Lanka's rural areas and the south, has used the power of the presidency to promote himself as the man who finally brought an end to the three-decade-long civil war that tore the country apart.

Mr Fonseka has similarly campaigned on his military record, but has also pledged to tackle the corruption he says has soared under his rival's rule.

Ahead of the polls, there had been concerns about possible violence amid allegations from both of the main candidates that the other was planning to "steal" the election.

As it was, a flurry of reports from across the island listed a series of grenade explosions in Jaffna and other towns, although there were no reports of anyone being hurt.

Mr Fonseka, the former army chief who is the candidate of a coalition of opposition parties, claimed that the government was trying to deter voters, though this was denied.

The biggest slip was an oversight by the former general who had apparently failed to register to vote. The election commission said this would not stop Mr Fonseka becoming President should he be elected.

For the voters at Menik Farm, the series of often-wretched camps close to the city of Vavuniya where at one point last year up to 300,000 Tamil civilians were being detained, there appeared little love for either Mr Rajapaksa or Mr Fonseka.

It seemed, rather, that people had made a calculation that a vote for the former army chief, who has said he will speed up the resettlement of the last of the refugees, was their best chance of going home. A Tamil coalition, the Tamil National Alliance (TNA), also threw its support behind Mr Fonseka and directed its supporters to do the same.

Almost everyone at Menik Farm had either lost someone during the war or else knew someone who had. As he walked back to the camp having cast his vote, Marimuththu Arumugham, a retired engineer, pulled from a plastic folder a small picture of his son, who had gone missing with his fiancée in the final days of the war.

The 75-year-old had neatly written the date he had last seen the couple, 28.3.09, when they were both taken away for questioning by the LTTE.

Having spent three months on the beach at Mullaitivu dodging shells and being used as a human shield, Mr Arumugham had little time for the Tamil separatists "who always said they were fighting for us". Against the odds he was now hoping for a miracle, praying that his son might somehow be in one of the camps.

For people with so many reasons to feel angry and frustrated, the long lines in which people stood for hours were remarkably orderly and dignified. At one point, the double-lined queue stretched for 500m before it twisted inside a school, made another turn, surged across the schoolyard and then entered a makeshift voting centre made of timber and metal sheets.

Inside this hot, airless shed, these voters hoping for change took their slip to a private booth, marked the paper, folded it and then handed it to a young woman in a print dress whose task was to push the completed papers through the slot of the ballot box with a long wooden ruler.

As she did so, she smiled.

It's in the stars: Why the President went to the country

Riding high on a wave of public support following the defeat of the LTTE, President Rajapaksa had no need to call an early election. He did so because a Buddhist monk astrologer warned that General Fonseka was going through a "raaja yoga", or a sign of "great things" usually seen in the birth chart of a statesman. "It is no secret that the government was rattled after seeing General Fonseka's horoscope," a ruling party official told Agence France-Presse. Indeed, sources claim that in addition to the decision to call the election, Mr Rajapaksa sought the guidance of astrologers on which date to hold the election.