Azerbaijan’s President, Ilham Aliyev, has pardoned 148 inmates, including 14 activists seen as political prisoners by human rights groups.
Among those freed is Rasul Jafarov, who was detained in 2014 while compiling a list of political prisoners.
Rights groups welcomed the pardoning, but said that many other leading government critics remained in jail.
The move is seen by some analysts as a concession ahead of Mr Aliyev’s visit to the US later this month.
Azerbaijan is often described by international rights groups as one of the most repressive countries in the south Caucasus, an allegation denied by the government.
Among those still in prison are prominent journalist Khadija Ismaylova and human rights lawyer Intigam Aliyev.
Also on Thursday, the appeals court in the capital Baku ordered the release of journalist Rauf Mirkadyrov, changing his six-and-half-year prison term to a five-year suspended sentence.
He spent 23 years in jail after being convicted of spying for neighbouring Armenia, Azerbaijan’s historic enemy.
Analysis: BBC’s Caucasus correspondent Rayhan Demytrie
The news of the release of prominent activists has come as a surprise.
There could be several reasons: Azerbaijan’s economy has been hit by falling oil prices and the collapse of the national currency.
Perhaps, the country cannot afford to remain unpopular with the international community. Much of the criticism over its human rights record has come from the West.
It could also be a concession from President Aliyev ahead of his scheduled visit to the US where Congress has been considering sanctioning senior Azeri officials.
But most notably, journalist Khadija Ismaylova is not on the list. Her investigative reporting focused on links between the Aliyev family’s fortunes and state assets.