SAN FRANCISCO (AP) - Josh Tomlin struck out five and pitched into the eighth inning to win back-to-back starts for the first time this year, and the Cleveland Indians capitalized on two costly errors to rally and beat the San Francisco Giants 5-3 on Monday night.

Tomlin (6-9) allowed six hits and three runs without walking a batter in 7 1/3 innings. Cleveland snapped a season-high four-game skid with its first victory against the Giants in the last seven tries.

Yan Gomes homered leading off the third for the Indians, who didn't have to travel far for a much-needed change of scenery after being swept across the bay at Oakland during a weekend series.

San Francisco starter Matt Moore (3-10) hit an RBI single in the third before a wild throw did him in, and the Giants dropped their fourth straight home game. Moore became the first Giants starter to lose five straight home starts since Ryan Vogelsong in 2011.