Updated

Zach McAllister was in complete control for four innings on Saturday. Then everything fell apart.

McAllister struggled during San Francisco's four-run fifth inning, and the Cleveland Indians lost 5-3 to the Giants.

"I thought I made some pretty good pitches and they went the opposite way," McAllister said. "It happens. You have to deal with that and be able to execute the next pitch and I wasn't able to do that."

Michael Bourn, Nick Swisher and David Murphy had two hits apiece for Cleveland, which blew a 3-0 lead.

McAllister (3-1) retired 12 in a row before Michael Morse led off the fifth with a single to center. Morse advanced to third on Brandon Crawford's one-out single and scored on Gregor Blanco's pinch-hit single that came on a first-pitch fastball.

Angel Pagan had a sacrifice fly and Hunter Pence hit a two-out, two-run single to give the Giants a 4-3 lead.

"That one inning it just got contagious," Giants manager Bruce Bochy said.

Indians second baseman Jason Kipnis had a chance to stop Pence's big hit but the ball slid under his glove and into right field.

"It cost us pretty much the game," said Kipnis, who drove in two runs. "Cost McAllister a good start, I could have bailed him out that inning. Just didn't happen."

McAllister left after Brandon Belt struck out to end the inning. He allowed five hits, struck out six and walked one after winning his previous three starts.

"I thought early on, his fastball had so much life to it and he was commanding it," Cleveland manager Terry Francona said. "And then in the fifth he just didn't quite command it as well. He wasn't missing by a lot and he didn't have a real good feel for his secondary pitches like he has the past couple starts."

Buster Posey added a solo homer in the sixth as San Francisco earned its third consecutive win. Posey, who won the NL MVP award in 2012, went 1 for 3 and is batting .103 (4 for 39) over his last 13 games.

Giants starter Tim Lincecum lasted just 4 2-3 innings, but managed to lower his ERA to 5.96. He was charged with three runs, two earned, and nine hits.

"We did a really good job of making (Lincecum) work," Francona said. "We just weren't able to get that one more hit to tack on."

Lincecum has pitched just 25 2-3 innings in five starts in his first season since he signed a $35 million, two-year contract over the winter.

"I had my game plan. I just wasn't executing it," Lincecum said. "That kind of exacerbated the feeling of hopelessness, I guess. Well, not hopelessness, but just things aren't going right. Fix that tomorrow."

But San Francisco continued to get strong work from its bullpen. Juan Gutierrez (1-1), Jean Machi, Jeremy Affeldt and Sergio Romo combined for 4 1-3 hitless innings after Lincecum departed.

Romo got three outs for his sixth save in six chances as San Francisco's bullpen lowered its MLB-best home ERA to 0.45 in 11 games.

"Very impressive," Bochy said. "They won the game for us today with the job they did."

Bochy went out of his way to praise Gutierrez for striking out Yan Gomes with the bases loaded to end the fifth inning.

Cleveland scored in the first, third and fifth to build a 3-0 lead. Kipnis singled in Bourn in the first and drove in Swisher with a grounder in the third. Swisher doubled home Bourn in the fifth.

NOTES: The Giants have now started off interleague play with two consecutive wins against the Indians after going 6-14 in 2013, the second-worst mark in MLB. ... McAllister registered his first career hit in the second inning with a single to right field. ... Giants Hall of Famer Willie Mays helped escort 3-year-old Cody Harrington to the mound to throw out the ceremonial first pitch. ... Right-handers Ryan Vogelsong (0-1, 7.71 ERA) of San Francisco and Danny Salazar (0-3, 7.85 ERA) of Cleveland enter Sunday's series finale in search of their first win of the year.