Sebastian Vettel said Mercedes "were hiding some eggs, but we found them" after beating Lewis Hamilton to victory at the Bahrain Grand Prix.
A slow stop for Bottas further delayed Hamilton, who lost a position when he rejoined before he was given a five-second penalty.
Vettel, to that point, had stuck his vehicle right behind Bottas and wasn't letting him create any separation.
Hamilton accepted the blame for his race-wrecking penalty, imposed by the stewards after the Mercedes deliberately held up Ricciardo.
Vettel was able to use DRS to move onto Bottas' tail, the Finn unable to break away and instead looking to manage his pace and back the field up.
Vettel came in for new tires on lap 11, prompting Red Bull's Max Verstappen to pit on the next lap.
"I had a good feeling yesterday so I was a bit surprised by how big the gap was". Verstappen blinked one lap later, but pushed too hard, too soon on his cold Pirellis, causing him to spin off the track at Turn 4, bringing his race to an early end.
Also, Verstappen wasn't the only driver to retire from the race, as Stoffel Vandoorne failed to make the start with a power unit issue, Kevin Magnussen came to a stop on track due to a mechanical problem, and Carlos Sainz and Lance Stroll collided in Turn 1 bringing out a safety auto. Bottas emerged from the pits in second behind Vettel, while Hamilton - despite going slowly and backing under Ricciardo to create space - had a slow stop that cost him a place to the Red Bull driver, leaving the Briton fourth for the restart.
The first safety auto of the race came out when Lance Stroll's race ended.
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.
Racing resumed on lap 16 with Hamilton immediately passing Ricciardo for third as the Red Bull driver struggled to get temperature into his soft tyres. Given the end of race traffic, Hamilton was likely to move slower giving Vettel a chance to close the gap, not to mention the Brit still had 5s to serve. Fernando Alonso retired one lap from the end, while his teammate Stoffel Vandoorne did not even start because of engine failure. "I was oversteering all through the race". Hamilton deserves credit for a ferocious second and final stint, but ultimately his mistake meant this one was always Vettel's to lose - and the German obliged with a faultless drive to re-claim the outright lead of the championship.
For the third race in a row, Ferrari went aggressive with its strategy and pitted Vettel on lap 10 in an attempt to undercut Bottas in the lead.
The victory was Vettel's second of the season after the four-time world champion won the opener in Australia.
"Lewis was a bit of a threat at the end, but the auto was a dream".
It was Vettel's third victory in Bahrain and the 44th of his career, a signal that Ferrari not only have a fast and competitive vehicle again, but also that the team has rediscovered its confidence.
It was a steady start from Hamilton, but Vettel showed greater bravery on the brakes and passed his championship rival round the outside to move into second place.
"People go, like, "you finished second, you should be happy".
Hamilton's Finnish team-mate Valtteri Bottas started on pole position for the first time in his career and ended up third.
He eventually got back past Felipe Massa's Williams but the Australian couldn't help but feel disappointed at the outcome.
Germany's Nico Hulkenberg was ninth for Renault, that team's first points of the year, and French rookie Esteban Ocon bagged the final point for Force India.