Updated

An activist in Azerbaijan jailed last year after taking part in anti-government protests has been released just days before U.S. Secretary of State Hilary Clinton's visit to the country.

The Supreme Court ruled Monday that Bakhtiyar Hajiyev could be freed early for good behavior after serving half his two-year sentence on charges of evading military service.

Harvard-educated Hajiyev was at the forefront of an Arab Spring-inspired wave of peaceful demonstrations in the former Soviet nation.

Activists said the jailing was retaliation for Hajiyev's political engagements.

A bipartisan group of U.S. Senators last month demanded Hajiyev's release, describing his arrest as a violation of freedom of expression and association.

Clinton is set to visit Azerbaijan on Wednesday as part of a whistle-stop tour of South Caucasus nations.