Shah Alam resigned from BSP membership and joined Samajwadi Party
When talking about the figures of Azamgarh lok sabha by-election, BJP's Dinesh Lal Yadav Nirahua got 312768 votes while SP candidate dharmendra Yadav got 304089 votes and Guddu Jamali got 266210 votes. It is said that if Guddu Jamali had not contested the elections, the path for the Samajwadi party candidate would have been cleared. But, Guddu Jamali, because of whom SP's dharmendra Yadav had to data-face defeat in the by-election, has now joined SP.
In 2012, mayawati gave ticket from BSP for the first time and he became mla by winning the election from Mubarakpur assembly seat. In 2017, again mayawati gave ticket and he became mla by winning the election from Mubarakpur assembly seat. But in the meantime, due to some differences with mayawati, Shah Alam resigned from BSP membership and joined Samajwadi Party. He hoped that SP would make him its candidate from Mubarakpur seat in the 2022 assembly elections, but this did not happen. Samajwadi party made old leader Akhilesh Yadav its candidate due to which Shah Alam got angry and asaduddin owaisi joined AIMIM. Although lost the election. After this, BSP gave him ticket in the lok sabha by-election held in 2022 and he stood third. bjp won this seat and SP had to data-face defeat, the reason for which was Guddu Jamali. He made a huge dent in the Muslim voters of SP.