Sri Lanka is allowing tens of thousands of Tamil civilians detained in state-run camps to move outside the camps.  But it may be weeks before the refugees can return to their homes.

Officials say thousands of Tamil men, women and children left Menik Farm - the biggest refugee camp housing displaced civilians - after its gates were thrown open on Tuesday. They say the refugees appeared to be very happy.

Tens of thousands of ethnic Tamil refugees, who fled their homes to escape fighting between government troops and Tamil Tiger rebels, have been confined in overcrowded, military-run camps in the north, even though the civil war ended six months ago.    

Nearly half of them were released in the last two months, in the wake of intense pressure from rights groups and the international community. 

The remaining 130,000 refugees are now being granted increased freedom of movement. Officials say the camps will now turn into "open camps," with inmates free to leave and return at will.

Government spokesman Luxman Hulugulle says there will be no limit on how long the Tamil civilians can remain outside the camps. 

"Now we have given the freedom for them to visit their relations, and, if they have relations, they can stay with those people, and reunion of families [is] being done.  So they are free to move around," he said.

However, officials say refugees will have to report back to the camp authorities. They say it is not possible for them to return permanently to their homes for some weeks, because many areas have still to be de-mined. 

But the government has said that all camps will be shut by the end of January.    

Authorities had earlier said the detention of the Tamil civilians was necessary to identify those with links to the rebels.

But, in recent weeks, the government has speeded up the process of resettlement of refugees. 

The military defeated the Tamil Tigers in May, ending a quarter century civil war fueled by complaints of discrimination against the country's minority Tamil community.  Last week, the government announced that presidential elections will be held in January two years ahead of schedule.  President Mahinda Rajapakse is hoping for a mandate in the wake of the victory against the rebels.