Prime Minister Narendra Modi on Tuesday said Uttar Pradesh was run by gangsters and mafias before 2017.