India's lawmakers on Saturday elected a veteran leader from the ruling Bharatiya Janata Party (BJP) as the country's next vice-president, boosting Prime Minister Narendra Modi's political standing.

Venkaiah Naidu, 68, secured 516 parliamentary votes to beat rival Gopalkrishna Gandhi — the 72-year-old grandson of Indian independence leader Mahatma Gandhi — who received 244 votes, according to polling officials.

Naidu, considered close to Modi, held the post of a federal minister before being nominated as vice president.

The vice president presides over the upper house of parliament and can take temporary charge of the largely ceremonial presidency in the event that the incumbent dies, resigns or is impeached.

Modi congratulated Naidu in a tweet and said, “I'm confident @MVenkaiahNaidu will serve the nation as a diligent & dedicated Vice President, committed to the goal of nation building.”

The BJP and its allies enjoy a majority in the 545-member lower house of parliament but not in the upper house, weakening its ability to pass legislation.

The BJP rules 17 of India's 29 states either directly or in alliance with regional parties.

Naidu's victory means the top three constitutional offices are now held by BJP leaders following the election of the party's candidate Ram Nath Kovind as president earlier this month.