On 26 May 2009, President Tandja dissolved parliament after the country's constitutional court ruled against plans to hold a referendum on whether to allow him a third term in office. According to the constitution, a new parliament was elected within three months. This began a political struggle between Tandja, trying to extend his term-limited authority beyond 2009 through the establishment of a Sixth Republic, and his opponents who demanded that he step down at the end of his second term in December 2009. See 2009 Nigerien constitutional crisis. The military took over the country and President Tandja was put in prison, charged with corruption.