The Nicaraguan government has released dozens of people arrested in last year’s crackdown on street protests, hours before government and opposition leaders were due to restart talks aimed at ending a national crisis.

Pablo Cuevas, an attorney for the Permanent Commission of Human Rights, a non-governmental organisation, said the detainees began leaving penitentiaries in the morning.

Nicaragua has been in a deep political crisis since President Daniel Ortega attempted social security reform last year, leading to massive protests.

Ortega, a cold war-era former guerrilla fighter who returned to elected office in 2006, unleashed a brutal government crackdown. Some 320 people were killed and more than 600 imprisoned, according to the Inter-American Commission on Human Rights.

In retaliation, the United States has ramped up sanctions on Ortega’s allies and family and limited Nicaragua’s access to financing. Donald Trump predicted this month that “the days of socialism” were numbered in Nicaragua, Venezuela and Cuba.

Television images showed minibuses apparently carrying released prisoners in the streets of the capital, Managua. Another rights group said some of the released prisoners would remain under house arrest.

One of the buses carried the marathon runner Alex Vanegas, an outspoken Ortega critic who was arrested in November.

“I’ll keep running for freedom in Nicaragua, I don’t care if they imprison me again,” Vanegas shouted from the window of the vehicle.

Talks began on Wednesday between the government, business representatives, students and opposition politicians, seeking a resolution to the crisis that has engulfed Nicaragua since last spring. Ortega did not take part.

“Today is to discuss who will mediate and who will facilitate,” said Juan Sebastián Chamorro, a negotiator in the opposition camp.

The government’s last attempt at dialogue with the opposition was in May, but the talks soon collapsed amid spiralling violence.

The protests faded under the crackdown, but independent journalists, rights groups and political activists report ongoing harassment and arrests that have led many to flee the country. The economy contracted by 4% in 2018.

The opposition is calling for electoral reform and justice for those killed in the protests, but the most pressing demand is the release of prisoners, the opposition leader Ángel Rocha said last week.