SAN FRANCISCO (AP) — Buster Posey twice watched plays he was part of go to replay, first on a three-run homer that held up and then a stolen base. A rare stolen base for San Francisco's catcher, who now has five to move within one of his career high set last season.

He matched teammate Denard Span's five stolen bases.

"I told Span I'm tied with him now so he needs to step it up," Posey said.

Posey's first-inning shot provided a nice early cushion to Ty Blach, who won his second straight start as the Giants beat the Chicago Cubs 6-3 on Tuesday night.

Replay showed Posey's drive to left-center had just enough to clear the wall and left fielder Jon Jay's outstretched glove before being caught by a fan.

Blach (8-7) hit an RBI single to help his cause and the Giants snapped a four-game losing streak to the Cubs with just their third win in the last 10 against Chicago, which rallied to win Game 4 of the NL Division Series and eliminate the Giants last October on the way to a World Series title.

Blach also beat the Cubs again after a May 22 win at Wrigley Field, allowing two runs on seven hits in seven innings Tuesday with three strikeouts and a walk. He sure likes it when he takes the mound already with a bit of wiggle room.

"The last couple of outings we've had some early leads for me," Blach said. "It makes it fun to pitch, attack the zone."

Brandon Crawford added an RBI single in the eighth after Joe Panik drove in a run on a seventh-inning groundout, then Sam Dyson closed it out for his seventh save.

Ian Happ had an RBI double and sacrifice fly as Chicago lost for only the second time in its last 14 road games dating to July 2.

"We're playing like that .500 team we were in the first half and I don't like it. We've got to get sharper," manager Joe Maddon said of the defending champs. "I'm just into starting pitching, catching the ball and defense, and I'll take our chances with the rest of the game. We just have to tighten it up on defense."

Cubs starter Jose Quintana (2-2) allowed four runs — three earned — and six hits in six innings, striking out three and walking one.

He faced San Francisco only once previously, taking a loss on Aug. 13, 2014, at AT&T Park, while with the White Sox.

Joe Panik replaced injured Miguel Gomez in the top of the second. Gomez, who had a first-inning groundout, felt some discomfort in his right knee.

MOORE'S STRUGGLES

Giants manager Bruce Bochy met with struggling starter Matt Moore and ultimately decided the left-hander will make his next turn to try to work out of it.

In fact, Moore was so frustrated he said he wanted to get back out there immediately.

Moore on Monday lost his fifth straight decision and is winless in seven starts since beating the Braves on June 20.

"He's close to coming out of this," Bochy said. "The best way to come out of it sometimes is to pitch."

TRAINER'S ROOM

Giants: 1B Brandon Belt (concussion) was scheduled to be evaluated Wednesday and is unlikely to go on the upcoming road trip to Washington and Miami. ... Closer Mark Melancon struck out two and allowed a hit in a scoreless inning for Class-A San Jose at Stockton as he works back from a strained forearm. ... RHP Johnny Cueto, nursing tender spots on three fingers of his pitching hand, will begin throwing this weekend.

UP NEXT

Cubs: RHP Kyle Hendricks (4-4, 3.81 ERA) is coming off a season-high tying seven innings last Friday against the Nationals. He also tossed seven innings in beating San Francisco on May 24 but has never won at AT&T Park.

Giants: LHP Madison Bumgarner (1-5, 2.88), who makes his sixth start since coming back from nearly three months off recovering from an April 20 dirt bike accident, is 8-2 with a 2.25 ERA in 12 career starts against the Cubs and 5-0 with a 1.74 over his last six vs. Chicago.

___

More AP baseball: https://apnews.com/tag/MLBbaseball