Yemeni authorities released on Thursday 17 of 58 political activists held since the 2011 uprising against former president Ali Abdullah Saleh, an AFP correspondent witnessed in Sanaa.
As they came out of the central prison's compound, youth activists who have been pressing for their release raised their hands chanting: "Revolt, revolt -- it will go on."
The former detainees quickly left with their families, who had been waiting outside.
Their release came after 20 detainees began a hunger strike on May 24 in a bid to step up pressure to be freed, according to local rights group Hood.
Some of them are suspected of involvement in an attack on Saleh in June 2011 which killed 11 of his guards.
On Wednesday, state news agency Saba reported that the attorney general has ordered the release of 17 out of 22 people detained for their suspected involvement in the attack.
According to local rights groups, the 22 had been held in Sanaa, 19 in Hajja province, 11 in Saada in the north and six in several other prisons across the country.
In addition to the 58 whose whereabouts had been documented, the fate of 17 others remains unknown, Hood says.
Leading youth activists, joined by Yemen's Human Rights Minister Huriyah Mashhoor have been campaigning for the release of the detainees.
In March, Hadi issued a decree ordering the release of those detained during the revolution, and activists accuse the public prosector, a remnant from the Saleh era, of having ignored it.
During the 2011 uprising, which erupted as part of the Arab Spring wave of protests, demonstrators frequently clashed with security forces and partisans of Saleh.
Hadi was elected in February 2012 as part of a UN-backed, Gulf-brokered exit deal that eased veteran Saleh out of office after 33 years in power, and ended a year of protests.