The 53-year-old professor in Lucknow University's commerce department has been a member of the Bharatiya Janata Party (BJP) since long, but he emerged on the central stage of the party's politics with his appointment as its national vice-president in August 2014, after the BJP's landslide victory in the parliamentary elections.
It was after Dinesh Sharma was made in-charge of the party affairs in Gujarat, his stature within the party grew immensely. He also won the trust of Prime Minister Narendra Modi and BJP chief Amit Shah during his stint in their native state.
Ever since a godman presented him a garland with a blessing that the "red beacon" will never leave his side, he became the Lucknow mayor for the second term, party insiders say.
He was first elected as the mayor of Lucknow in 2008. He stood for re-election in 2012 and defeated his nearest rival, Neeraj Bora of the Congress by over 1.71 lakh votes.
Mr Sharma has the backing of the RSS and it is said that Sangh ideologue Deen Dayal Upadhaya often visited his parent's home in the state capital.
It was on his invitation that Prime Minister Narendra Modi had attended the Lucknow Ramlila in October 2016.
He also played a key role in the organisation during its membership drive when 10 crore new members were roped in.
Keshav Prasad Maurya will be the other deputy chief minister in the government to be headed by Yogi Adityanath.