Updated

Principal leaders of protests against President Daniel Ortega's government and two prominent journalists were freed from prison Tuesday ahead of a June 18 deadline to release the last of hundreds of people the opposition considers political prisoners.

Neighbors and friends gathered to receive the newly freed activists with Nicaraguan flags, blue and white balloons and cheers. Videos circulated online showing rural movement leaders Medardo Mairena and Pedro Mena, student leader Edwin Carcache and 100% Noticias journalists Miguel Mora and Lucía Pineda Ubau.

The releases came amid a broader move to set free people detained since last year for their role in the protests under an agreement meant to ease the country's political standoff.

The government has been gradually releasing prisoners since dialogue between the two sides reopened in February, though those talks later stalled with little progress on reaching agreement, in part over opposition demands that all jailed government opponents be freed and cleared of charges.

Authorities said in a statement that 56 people were freed Tuesday and that the International Committee of the Red Cross accompanied them to their homes. Fifty others were released the previous day, and the Civic Alliance opposition group estimated that the number behind bars is now around 80, down from hundreds previously.

Defense attorney Julio Montenegro demanded the government free all remaining "because none of the political prisoners is guilty of a crime."

Tuesday's releases came as a surprise, with no prior word from the government, he added.

"It was to prevent there being a media presence at the releases and to avoid having people's excitement be seen," Montenegro said. "But that all got to social media regardless."

Noé Ubau, cousin of Pineda Ubau, said the two 100% Noticias staffers had left prison early Tuesday. Ubau was the station's spokeswoman, and Mora its director, before it was raided and shuttered in December.

Pineda said she would travel to Costa Rica where her family lives. Tens of thousands of Nicaraguans fled to exile during the unrest, many of those to neighboring Costa Rica.

Irlanda Jerez, another person freed Tuesday, alleged that armed men attacked her home and beat her husband minutes after her release, but could not say who.

The Organization of American States and the Inter-American Commission on Human Rights celebrated the releases.

On Saturday, Nicaraguan lawmakers allied with Ortega passed an amnesty law for crimes related to the protests, which erupted in April 2018 over a proposed social security reform and broadened to include demands that Ortega leave office and allow early elections. Government officials have repeatedly alleged that the demonstrations amounted to "terrorism" and an attempted coup.

The ruling Sandinista party argues the amnesty seeks to bring about "reconciliation" and a "stable and lasting peace," but opposition leaders have criticized it as allowing impunity for police and pro-government civilian militias implicated in killings and other abuses in a crackdown that left at least 325 civilians dead and 2,000 more injured, according to the Inter-American Commission on Human Rights.