The Samajwadi Party has wrested Gorakhpur, Chief Minister Yogi Adityanath's home constituency, from the BJP after several decades. (Photo Credit: Twitter/@arcschoolofart)

The Uttar Pradesh government has transferred 37 IAS officials, including 16 District Magistrates, an official said on Saturday.

Rajiv Rautela, the District Magistrate of Gorakhpur, who courted controversy on Wednesday for barring the media from accessing details at the Lok Sabha bypoll counting centre, has been shifted and prompted as Divisional Commissioner of Devipatan.

The bureaucratic rejig was effected late on Friday.

The Samajwadi Party has wrested Gorakhpur, Chief Minister Yogi Adityanath's home constituency, from the BJP after several decades.

Also read: Byelection outcome worries BJP-JDU alliance | What you need to know

Anoop Chandra Pandey, the industrial and infrastructure development commissioner (IIDC) credited with the success of the 'UP Investors Summit' held in February has been rewarded with additional charge of the NRI Department, besides the additional charge of Greater Noida.

Alok Sinha has been made the new principal secretary (Commercial Tax), Nitin Ramesh has been made the new principal secretary (Housing). He replaced Mukul Singhal who has been sent to the Silk Department.

Senior bureaucrat Rajeev Kapoor who was in waiting ever since his return from a central deputation has been made the chairman of PICUP; Alok Tandon has been given additional charge of Noida as its chairman.

Deepak Agarwal has been made the new divisional commissioner of Varanasi while Chandra Prakash Tripathi has been made the new commissioner of Saharanpur.

Also read: UP bypoll results: 5 takeaways from BSP-SP alliance, 2019 Lok Sabha elections

Ravindra Naik, has been made the director industries, while Saumya Agarwal has been given the charge of vice-chairperson of Kanpur Development Authority (KDA).

Chandra Bhushan Singh has been given charge as new District Magistrate of Aligarh, S.V. Ranga Rao is the new commissioner of Azamgarh while Shivakant Dwivedi has been made the new District Magistrate of Azamgarh.

Rajendra Prasad is the new District Magistrate of Bhadohi, Krishna Karunesh (Balrampur), Pramod Kumar Upadhyaya (Hapur), Hemant Kumar (Amroha), Navneet Chahal (Chandauli), Rama Shankar Maurya (Hathras) and Amit Singh is the new District Magistrate of Sonebhadra.

Pranjal Yadav, who was special secretary in Udyog Bandhu and played an important role in the Investors Summit has surprisingly been shunted out and made the new director (Training).

Surendra Vikram has been removed and replaced by Bhawani Singh as District Magistrate of Ballia. Sarika Mohan has been removed and replaced by Sheetal Verma as District Magistrate of Sitapur.

Akhilesh Kumar Mishra has been made the new District Magistrate of Pilibhit.

District Magistrate of Bareilly Raghvendra Singh, who had created a storm after his comments on the social media on the growing communal temper in the state has also been removed.

Watch: BJP's Gorakhpur setback: Stronghold loss for Yogi or Modi?