Philippine President Benigno Aquino has ordered the release of 43 health workers accused of being communist rebels.
Mr Aquino said "their right to due process" had been denied during nearly a year in detention.
The detainees, who were arrested by the military, had begun a hunger strike to raise awareness of their plight.
Communist leaders were also demanding their release ahead of a new round of planned peace talks next year.
The chief negotiator of the Communist Party of the Philippines, Louie Jalandoni, told the BBC recently that freeing the health workers was one of several confidence-building measures that they hoped to see ahead of the talks.
The recently-installed Aquino government has agreed to re-start peace talks to try to end the 42-year insurgency by communist rebels, which has claimed tens of thousands of lives.
The 43 detainees were arrested in February 2010 as they attended a health workshop near Manila.
They claimed that the armed forces had planted bomb-making materials and weapons on them, and treated them badly after their arrest.
The group, known as the Morong 43, said they were denied access to lawyers and were held in isolation at a military camp.
"We recognise their right to due process was denied them," said Mr Aquino.
He said they would be freed as part of his government's commitment to human rights.
"For the first time in decades, we have a government that is serious about human rights. The culture of silence, injustice and impunity that once reigned, is now a thing of the past," he said.
Supporters of those detained said they hoped they would be freed as early as next week, and the police said they would respect the president's decision.
Negotiators from the Philippine government and the country's communist movement have agreed to resume formal peace talks in Oslo, Norway, in February next year.
If the talks go ahead, it will break a five-year hiatus in the peace process.