The race has been held under floodlights since 2014.
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.
With Max Verstappen having already crashed out with a brake failure, Hamilton was clearly intent on taking another Red Bull out of the picture.
"I got hit from the side", the Williams rookie exclaimed.
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 vehicle.
Hamilton, who was penalised for a pit-lane incident by braking in front of Ricciardo when he slowed before stopping, congratulated Vettel and thanked Bottas, who moved over to let the Briton through in the closing laps.
The incidents were coming fast, with 18-year-old Lance Stroll hit from the side on lap 13 by Carlos Sainz Jr. and this forced the safety auto to come out.
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.
EA Officially Reveals Star Wars Battlefront II, Single-Player And All
He explained: "Part of what's she's dealing with is the realisation that she has this power and this gift". The Last Jedi will be released this December 15 and features the handsome scenery of Malin Head.
These days the 86-year-old is the chairman Emeritus of the Formula One Group and was seen at the Sakhir Circuit mingling with drivers past and present including Vettel and former Ferrari star Jean Alesi.
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. Vettel pitted three laps later and dropped to third behind Raikkonen, who had recovered from his slow start but was still yet to make a second stop.
Further back, Fernando Alonso's woes with McLaren continued as he languished outside of the points, being passed by both Daniil Kvyat and Jolyon Palmer on the same lap at one point.
"Lewis had to try, which I understand, but personally it is tough".
Ultimately, Vettel crossed the line six seconds clear of Hamilton but the Mercedes appeared to hold a strong pace advantage over the Ferrari in the final segment of the race. Ferrari did not react in kind, although as Vettel's lead was wiped away bit by bit, it seemed to be just a matter of time before he would come in. With Hamilton dropping out of DRS range but Vettel unable to attack the lead Mercedes, Ferrari opted to pit early at the end of lap 10, with Red Bull following suit with Verstappen a lap later. But Verstappen's potential charge was brought to a end on his outlap when his vehicle ploughed straight on at Turn 4 and into retirement with brake failure.
It was Vettel's third win in Bahrain and the 44th of his career, a landmark that left him satisfied with his and the team's work which proved that Ferrari, who employed an aggressive strategy, are back as championship contenders. 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. With 10 laps to go, the gap stood at 12 seconds.
Romain Grosjean, Nico Hulkenberg and Esteban Ocon completed the top ten, while Pascal Wehrlein delivered an impressive return performance to finish 11th for Sauber. "Losing points for the team is definitely painful". Teammate Kevin Magnussen retired early on after starting last.