Bopanna's original choice was Saketh Myneni but All India Tennis Association (AITA) selection committee felt that Paes and Bopanna are the "best bet" for a medal.
Bopanna will now have two shots at the Olympic medal as he has also been nominated for the mixed doubles event with Sania Mirza, who had also wanted to play him.
Sania will play women's doubles with Prarthana Thombare, who trains at her academy under her father and coach Imran Mirza.
In a departure from norms, AITA has named a seven-member team after Paes made himself available and feels that spending a week together before the Games will give them opportunity to bond well.
More From This Section
In all, a major crisis, which had become a trend before Olympic team selection, has been averted this time with Bopanna not defying AITA's decision.
"We have the highest respect for all the players. We want them to play at the optimum level while representing the nation. All the players are equally respected," AITA President Anil Khanna, who is also the ITF Vice President, said after announcing the pairings.
Bopanna had written to AITA that he and Paes have not been able to put together a good combination despite best efforts.
"I have much admiration for Leander Paes and his many achievements but I do not believe our styles of play are either compatible or complementary. Considering that this is a team event where two individuals need to gel together to do well, regardless of individual achievements, it is the team and the combination that matters," he wrote in his letter yesterday.
"The AITA Selection Committee has now made its decision after due consideration of my representation and has selected the team for the Olympics. I respect this decision and look forward to participating in Rio," he said in a statement.
AITA also appointed Davis Cup coach Zeeshan Ali as captain of the Olympic squad.
Giving the reasoning for pairing Sania with Bopanna, Khanna said it was a question of court combination.
"Rohan plays from the left side of the court and Sania from the right. Leander also plays from right. So we need to give this change," Khanna said.
Asked if one week is enough for Paes and Bopanna to sort out the differences that have piled up in years, Davis Cup coach Zeeshan said, something is better than nothing.
"It's better to be together at least for a week, than not being together at all. Dialogue is important. Now that everything has been sorted, we are set for the Games," he said.
Yuki Bhambri, the highest-ranked singles player in the country at number 147, Myneni (ranked 150 in singles and 125 in doubles), Bopanna (ranked 10 in doubles), Paes (ranked 46 in doubles), Ramkumar Ramanathan (224 in singles) Vishnu Vardhan and Sumit Nagal are in the squad.
Without naming either Yuki or Myneni, Khanna said some players are coming back from injury, so all seven are in squad.
"There's still some time so there is no necessity to announce the final squad today.
(REOPENS SPD 2)
Paes, winner of 18 Grand Slam titles, expressed gratitude for being selected in the Olympic team by the AITA.
"To play for the flag has always been the greatest inspiration for me. I am humbled by the love showered upon me by the people. Their overwhelming and unconditional support has been my pillar of strength and motivation throughout my career," Paes said in a statement.