Congress leader Manmohan Singh will be the next prime minister.
Singh was elected leader of the Congress Parliamentary Party at a general body meeting in the Central Hall of Parliament after party president Sonia Gandhi rejected appeals to reconsider her decision not to be PM.
Singh, 71, was elected at an in-camera meeting of the CPP in contrast to Gandhi's election last week.
Gandhi will remain CPP chairperson and Singh will be her deputy.
The two leaders will meet President A P J Abdul Kalam at 2015 IST to stake claim to form government.
Finance minister in Narasimha Rao's government between 1991 and 1996, Singh belongs to the Rajya Sabha and in fact has been Leader of the Opposition there.
Usually, the PM is the leader of the House in the Lok Sabha.
Now someone else will have to be the leader there.
Gandhi proposed Singh's name, which was seconded by a number of others.
Singh's election was unanimous, Congress spokesman Anand Sharma said.
Gandhi was present during the proceedings in which only the newly elected Lok Sabha and sitting Rajya Sabha members were present.
After the election, Singh and Gandhi posed for photographs.
Earlier, throughout the day Congress leaders sought to pressure Gandhi into changing her mind
However, Gandhi had made up her mind and right from the morning started meeting leaders of allied parties, calling on some of them and explaining to them the reason for her not taking up the top post.