Legislation aims to free those detained for political reasons between 1999 and present day and will lead to release of hundreds of opposition figures, journalists and activists.