The bench said the amendment was "arbitrary, discriminatory" and violates the concept of equality.
"Undoubtedly, Section 4 (3) of the 1981 Act would have the effect of creating a separate class of citizens for conferment of benefits by way of distribution of public property on the basis of the previous public office held by them".
A bench headed by Justice Ranjan Gogoi said the amendment in the legislation was ultra vires to the Constitution since it transgresses the concept of equality under the Constitution.
The petition filed by the NGO challenged the constitutional validity of the Uttar Pradesh Ministers (Salaries and Allowances and Miscellaneous Provisions) Amendment Act of 2016 and The Allotment of Houses under Control of the Estate Department of 2016. "Public office becomes history after a person demits the office and it cannot be the basis for giving government residential accommodation for rest of his life", said the SC.
In 2016, the UP government had passed a legislation allowing all former CMs to stay in government bungalows indefinitely.
At present, the chief ministers who have possession of official bungalows are Samajwadi Party's Akhilesh Yadav and Mulayam Singh Yadav, Bahujan Samaj Party supremo Mayawati, Bharatiya Janata Party's Rajnath Singh and Kalyan Singh, and ND Tiwari of the Congress party.
In 2016, the top court had ordered the former chief ministers to handover the bungalows and had also asked the state government to charge them rent for the period during which they were "unauthorised" to live in them.