Indira Gandhi was accused by Raj Narain for misusing the state machinery during her election polls.
After that, the Allahabad High court did find her guilty, by virtue of which dismissed her immediately from the Lok Sabha. The high court also barred her from contesting in future elections for 6 years and demanded her resignation from PM post. Indira Gandhi appealed to the supreme court the same day and her case was accepted. The court granted her bail and allowed her to remain as Prime minister for 6 more months within which the said case would be completed, yet refused to reinstate her as a member of Parliament. Facing certain doom if the case went on in the supreme court as before, Indira Gandhi successfully recommended to the President to declare a state of emergency the next night and began her rule by decree.
During this time, Indira Gandhi pushed for the 39th Amendment Act to secure her position and prevent her removal from Indian politics. She also went ahead bringing about the forty second amendment act that included clause 4 and 5 of Article 368, removing all restriction regarding the amendment power of the parliament and providing that amendments were not contestable in any court of law in India.