Mahendra defeated political heavyweight Sharad Pawar 16-15 on Wednesday after outgoing president Jagmohan Dalmiya exercised his casting vote to break the tie.
Karunakan Nair was re-elected as the secretary after the board's annual general meeting, which was twice postponed.
"It was a closely-contested election but I am happy to have won. My election was fair," said Mahendra, son of former Haryana chief minister Bansi Lal.
Mahendra, considered Dalmiya's candidate, had previously held various posts in the Board of Control for Cricket in India, including that of secretary.
Pawar claimed that a representative from his home state of Maharashtra was not allowed to cast his vote and it proved decisive.
"In this match the bowler and the umpire was the same man," said Pawar, agriculture minister in the ruling Congress government.
"The casting vote itself indicates what the plan was. The time has come to give a serious thought to the process of elections."
Meanwhile, a court in the southern city of Madras restrained the board till October 11 from confirming the appointment of Dalmiya as patron-in-chief.
The board had earlier this month named Dalmiya as the board's first patron-in-chief though the confirmation of the appointment as well as his powers were to be decided in the ongoing two-day annual general meeting.
Dalmiya, 64, is the current Asian Cricket Council president and a former International Cricket Council chief.