Sri Lanka today bowed to international pressure and announced plans to close the internment camps that are home to more than 130,000 people locked up since the end of the country's bitter civil war six months ago.

Two days after the UN's top humanitarian official, Sir John Holmes, urged Sri Lanka to allow those inside the camps to leave, the government in Colombo announced that the internees would be set free from their barbed wire enclosures from 1 December.

A statement from Basil Rajapaksa, the brother of Sri Lankan president Mahinda Rajapaksa and one of his key advisers, said the camps would close completely by 31 January.

The camps and the detention of hundreds of thousands of people after the end of the fighting have become a diplomatic embarrassment to the Sri Lankan government, which had hoped to capitalise on its success in bringing the 26-year civil war to an end.

Instead, it found itself on the receiving end of international condemnation over the detention of noncombatants and mounting criticism of the conditions inside the camps, which – although they had improved considerably – remained squalid.

Domestic political considerations may also have played a part in the decision to speed up the releases.

President Rajapaksa received an unexpected political setback earlier this month when Sarath Fonseka, the head of the army and the man who plotted the defeat of the Tamil Tigers, announced that he was quitting to "fight for democracy".

He is widely expected to mount a challenge to the president in forthcoming elections, possibly as early as next April, and his popularity could mean a much closer fight than the incumbent was expecting.

In a farewell letter to troops Fonseka pledged to work to restore human rights, media freedom, social justice, ethnic unity and peaceful coexistence. "I want to assure you that I will commit myself to protect democratic freedoms which we are rapidly losing," he wrote.

Sri Lanka had already acknowledged the international clamour for action on the camps when it pledged in September to release all the detainees by the end of January, but until very recently officials briefing privately had continued to stress the problems faced by the government in dealing with the inmates of the camps.

One official told the Observer that concerns remained about whether many of those held behind the barbed wire fences had played an active part in the Tamil Tiger military campaign or had offered support to the terrorists. He also cited security problems which made it difficult to return some people to their villages, particularly the presence of minefields, which were used extensively during the military conflict. It is understood that many of the estimated 1.5 million mines have yet to be made safe.

The decision received a qualified welcome from the humanitarian agency Unicef, whose spokeswoman Sarah Crowe said it was "to be welcomed without any doubts" but cautioned that those who had been locked up for months would need time to adjust.

"It means people now have a chance to live a normal life and it must be a huge relief to them," she said.

"But the next step will be reunification. That clearly has to happen and there is a need for trauma counselling, particularly for children who have lived through horrid, horrid times and seen things they should never see, really the stuff of nightmares, that will live with them for a very long time."

An estimated 136,000 Tamils remain behind barbed wire, most in the Menik Farm complex near the town of Vavuniya.

As many as 300,000 people were detained as they fled the last days of the fighting. Most were picked up at the end of the April and in early May after escaping from the so-called no-fire zone in which the government forces had cornered the Tamil Tigers.

Many accused the rebels of using them as human shields and there were credible accounts from witnesses that civilians who tried to escape were shot by rebels.

But once they made it through to the government lines, they were put on to buses and taken to Vavuniya, where they were detained initially in tents, with reports of up to 20 people in each one.

Conditions in the immediate aftermath of the end of the fighting were dire, with even the Sri Lankan authorities conceding that they struggled to cope with the sheer volume of refugees.

Those detained included a British citizen, Damilvany Gnanakumar, who was eventually released in September.

Human rights groups had criticised the detention, claiming it was an illegal form of collective punishment for Tamils. There was also heavy criticism of the limited access permitted to the camps, with media heavily restricted and even aid agencies having problems gaining admittance on some occasions.

Yesterday Basil Rajapaksa said the military had agreed that the detainees could be released because they no longer posed a security threat.

"They are free to move in and out of the camps and could even go home if they wished," he said, adding that detainees would be allowed to settle in areas cleared of mines.