Why did Indira Gandhi declare an emergency?

Ex-PM of India Indira Gandhi declared a national emergency in the v hours of June 26, 1975. The proclamation of it was signed by president Fakhr Uddin Ali Ahmad. The goal of the 21-month-long emergency was to control internal disturbance the constitutional rights were suspended and freedom of speech and the press were withdrawn several political leaders activists and trade unionists who were opposed to the congress party were imprisoned. Indira Gandhi justified the drastic measure in terms of national interest and gave three grounds.
India’s security and democracy were in danger owing to the movement launched by Jai Prakash Narayan,
There was a need for rapid economic development and upliftment of the underprivileged.
There was an intervention of powers from abroad that could destabilize and weaken India.
But, the emergency resulted in riots growing unemployment rampant inflation, and scarcity of food.
The constitutional status of a national emergency
It is mentioned in article 352 of the Indian constitution and is proclaimed by the president of India.
It must be approved by both the houses that are (Lok Sabha and Rajya Sabha) within a period of one month.
The president can suspend all the fundamental rights during a national emergency except for articles 20 and 21.
It can be declared on the ground of war external aggression or armed rebellion