During this time, he acted unofficially as the Ameer (leader) of Jamaat-e-Islami until 1991, when he was officially elected to the post. This led the government arresting him and an unofficial court called "The People's Court" was established by the civilians such as Jahanara Imam to try alleged war criminals and anti-independence activists. Imam held a symbolic trial of Azam where thousands of people gathered and gave the verdict that Azam's offences committed during the Liberation War deserve capital punishment. In 1994, he fought a lengthy legal battle which resulted in the Supreme Court of Bangladesh ruling in his favor and restoring his nationality.