DENVER >> Ezequiel Tovar homered for a third straight game, hitting a tie-breaking two-run drive in the fifth inning, and the Colorado Rockies beat the San Francisco Giants 4-3 on Saturday night.

Kyle Freeland (2-3) went six innings and allowed three runs — two earned — on five hits in a fifth consecutive quality start since being reinstated from the injured list June 23 after missing two months due to a left elbow strain. He struck out four and walked one to win back-to-back decisions for the first time this season.

Tyler Fitzgerald, batting ninth in the order, doubled and homered to drive in two runs for the Giants. Wilmer Flores had a run-scoring double after Matt Chapman reached with two outs in the top of the sixth on shortstop Tovar’s fielding error.

Logan Webb was coming off his worst start of the season. He had matched a career-high when he allowed seven runs in five innings in a 10-6 loss to Toronto on July 10.

Webb (7-8) kept the Rockies in check until Sam Hilliard singled to start the fifth. One out later, Tovar connected for his 16th home run of the season, sending Webb’s offering over the left field fence. Webb went six innings and allowed four runs on eight hits. He walked four and struck out four.

Fitzgerald homered off Freeland in the third and doubled home Mike Yastrzemski, aboard with a triple, in the fifth.

Nick Mears pitched two hitless innings in relief, starting his outing by striking out four in a row, and Victor Vodnik pitched a hitless ninth for his third save.