Hamilton was then handed a five seconds penalty for holding Ricciardo at the pit entry.
The three-time world champion said the penalty was a setback, but that his Mercedes may not have been fast enough to overhaul the triumphant Ferrari of Sebastian Vettel.
Bottas complied with a mid-race instruction from the team to allow Hamilton through as Vettel was pulling away and did not put up much of a fight in the second stint either, which led to Hamilton referring to the Finn as "a gentleman".
Hamilton accepted the blame for his race-wrecking penalty, imposed by the stewards after the Mercedes deliberately held up Ricciardo.
While Bottas led he was not pulling away from the chasing pack. Vettel came out in 12th place, and on the next lap, Verstappen of Red Bull came over the radio and said that his team needed to do something, so they pitted him, it stated. "I try to handle it the best way I can but it eats you up a little bit inside and you've just got to end up trying to cope and move forwards". However, Verstappen crashed out due to a brake failure the next lap. He held off a late charge from Lewis Hamilton of Mercedes, and he outraced Valtteri Bottas from beginning to end to take the race.
With Valtteri Bottas leading after securing the first pole of his five-year F1 career, the safety auto was deployed on lap 13 after a collision between Carlos Sainz and rookie Lance Stroll.
After back-to-back races in China and Bahrain, F1 takes a short break before returning in two week's time for the Russian Grand Prix at the Sochi Autodrom on April 30.
Ironically, Hamilton then exited the pits behind Ricciardo before spearing past the Red Bull when the race resumed following a crash between Lance Stroll and Carlos Sainz.More news: Delta OKs $10000 Payments To Passengers On Overbooked Flights
Ferrari driver Sebastian Vettel of Germany steers his auto during the Bahrain Formula One Grand Prix, at the Formula One Bahrain International Circuit in Sakhir, Bahrain, Sunday, April 16, 2017.
And, but for his unwise decision to employ a spot of gamesmanship, he might well have been on the top step of the podium for the second race in succession. Bottas moved out of the way at Turn 14 with 10 laps remaining to allow his teammate to chase the win, but despite Hamilton closing a gap of almost 20 seconds after his stop to just five at one stage, Vettel managed the gap to secure the win.
And when it all played out, Vettel who had dropped to ninth after his pit stop, was back in the lead.
"I never raced with less power in my life", the Spaniard told his team. But on lap 26, and with Vettel now six seconds up the road, the telephone call came from the pit wall to instruct Bottas to get out of Hamilton's way.
The four-time world champion might need to brush up on his geography skills though.
"We lost a lot of points, especially at the moment with the state the auto is, we should have taken a lot of points, and a bit unfortunate", the Dutchman said. On lap 36 Vettel caught Raikkonen and the Ferraris traded position, giving Vettel a clear road to hunt down Hamilton who was still in the lead.
"People go, like, "you finished second, you should be happy".
Hamilton's Finnish team mate Valtteri Bottas was third, after starting on pole position for the first time in his career.