SAN FRANCISCO (AP) For much of this week, Madison Bumgarner spent extra time throwing on flat ground as he tried to get his feel back after a forgettable outing at Coors Field.

He sure had some of his best stuff this time.

Bumgarner carried a no-hit bid into the sixth inning and won his fourth straight decision, pitching the San Francisco Giants past the Philadelphia Phillies 5-0 on Thursday night to snap a four-game losing streak.

Not that the humble lefty even concerns himself with such things as no-hitters - though he knew he had it going, saying, ''I never believe when guys say they don't know.''

''Honestly, I don't care about it,'' he said. ''I just want to win the game. I'm not out there for any kind of personal achievements or goals.''

Pinch-hitter Cesar Hernandez hit a sharp single up the middle with one out in the sixth to break it up. Before that, the only Phillies baserunner came when Rhys Hoskins drew a one-out walk in the fourth.

Mike Yastrzemski hit a solo homer and drove in three runs to get the offense going after San Francisco scored just four total runs the previous three days in being swept by the Nationals.

Phillies slugger Bryce Harper had his majors-best streak of reaching base end at 21 games with an 0-for-3 night.

The Giants delivered four straight hits against Aaron Nola (10-3) to start the third and back Bumgarner (7-7), capped by Yastrzemski's two-run double before he got caught in a rundown trying to stretch it to a triple. San Francisco left the bases loaded in the fourth.

Big cheers greeted MadBum before the lefty ace's first home start since the trade deadline and the Giants' decision not to deal him. Speculation had swirled for months he might be a trade candidate, then San Francisco put together an impressive winning stretch and opted to move a trio of relievers instead.

Bumgarner kept foiling the Phillies while pitching seven days past his 30th birthday.

''We have to make good pitchers work hard, and fight for every inch, and we weren't able to run his pitch count up at all,'' Phillies manager Gabe Kapler said.

Bumgarner earned only his second victory in seven starts. Against the Rockies on Saturday, he was tagged for five earned runs on eight hits in five innings and was unable to throw the ball where he wanted it.

The 2014 World Series MVP allowed just the one hit and a walk to the Phillies and struck out three in seven innings before giving way to Trevor Gott in the eighth. Will Smith finished the one-hit shutout.

At the plate, Bumgarner lined a single to left in a nine-pitch at-bat in the third.

''He did it all tonight,'' said manager Bruce Bochy, who took Bumgarner out after 85 pitches given all the extra work between outings. ''What a great at-bat to get that base hit to get the rally going.''

Brandon Belt hit an RBI single for the Giants during the decisive third inning and Kevin Pillar used aggressive baserunning to add on in the sixth. He reached on a force, stole second for his 10th steal this year, went to third on a throwing error by Sean Rodriguez then scored on Nick Pivetta's wild pitch.

Three-time Gold Glove shortstop Brandon Crawford dove to his left for a snazzy catch on Jean Segura's liner in the seventh.

Harper, pursued hard by the Giants during the offseason, was booed when he stepped in to bat in the first and every time after that, too.

Nola lost for the first time since June 21 against Miami, a span of five decisions and nine starts. It was only his second road defeat in 10 starts.

Philadelphia was swept in a three-game series at San Francisco last season and has lost 13 of 16 in the Giants' waterfront ballpark.

BRUCE RETURNS

Jay Bruce came off the injured list for his first game since July 16 because of a right oblique strain.

The left fielder went 0 for 3 batting fifth.

TRAINER'S ROOM

Phillies: C J.T. Realmuto had the night off before a pinch-hit appearance in the ninth. ''We're traveling from Phoenix, where it's pretty easy to get dehydrated, and we got in late last night. Any time you have that kind of travel, it's always valuable to respect your starting catcher, a guy who you really lean on,'' Kapler said. ''J.T.'s caught a lot of games for us. It's important to get him off his feet once in a while, so we're doing that and pairing (Andrew) Knapp with Nola. They've had some success together.'' ... To make way for Bruce's return, the Phillies optioned OF Adam Haseley to Triple-A Lehigh Valley.

Giants: OF Steven Duggar went on the 10-day injured list with an AC joint sprain in his left shoulder that isn't expected to require surgery. Bochy isn't ready to call it season-ending. Duggar was hurt making a diving catch to rob Juan Soto ending the fourth inning in Wednesday's loss to the Nationals. ''He's going to be down for a little while,'' Bochy said. ''We'll wait to see how this thing comes around the next couple weeks.'' ... RHP Shaun Anderson also was placed on the IL because of a blister on his right middle finger. ... OF Alex Dickerson (right oblique strain) was set to hit in the cage for the first time to test his injury.

UP NEXT

LHP Drew Smyly (2-6, 7.01 ERA) pitched seven scoreless innings with five strikeouts to beat San Francisco on July 30. RHP Tyler Beede (3-6, 5.38), who has lost his last three starts, opposes Smyly again.

---

More AP MLB: https://apnews.com/MLB and https://twitter.com/AP-Sports

Copyright 2019 by STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.