SAN FRANCISCO -- After being held to 18 hits in a three-game series against the New York Mets earlier in the week, the San Francisco Giants knew they were capable of much more with the Philadelphia Phillies coming to town.
The fact that their offensive explosion came at the expense of Phillies ace Cole Hamels was a surprise, though.
"This was a good pitcher we faced tonight," Giants manager Bruce Bochy said after watching his team piece together 22 hits in a 15-2 win over Hamels and the Phillies on Friday night in the opener of a three-game series.
"I've said many times: This is a better offense than we've been doing. You knew we were going to break out at some point."
Giants right fielder Hunter Pence capped an eight-run uprising against Hamels in the fourth inning with a grand slam, highlighting the defending champions' highest scoring output of the season.
"Hamels is a great pitcher," said Giants center fielder Angel Pagan, who contributed three hits and two RBIs. "Today we had some real good at-bats and we were able to get him out early."
Second baseman Joe Panik, third baseman Matt Duffy and left fielder Justin Maxwell banged out four hits apiece as the Giants set a team record for most hits in a game at AT&T Park with 22 against five Phillies pitchers.
"He was all over the place," Phillies interim manager Pete Mackanin said of Hamels, who allowed career highs in runs (nine) and hits (12) in 3 1/3 innings. "Everything seemed to be hard. He didn't have command. Obviously, it wasn't one of his better performances."
All-Star left-hander Madison Bumgarner was the beneficiary of the offensive onslaught and also contributed to it with two singles and an RBI.
"We beat a real good pitcher today," Bumgarner said. "We swung the bats today as good as we can swing 'em.
"It's fun watching our guys play good baseball. We know what kind of team we have. We know what we can do, what we're capable of."
Bumgarner (9-5) pitched only 5 2/3 innings but managed seven strikeouts. He allowed two runs, eight hits and two walks.
"If there's any time I can save a few bullets," Bochy said of pulling Bumgarner with a 10-2 lead, "I'm going to do it."
The two runs were two more than the Phillies had against Los Angeles Dodgers standouts Clayton Kershaw and Zack Greinke in their previous two games. They ended a 23-inning scoreless streak on catcher Carlos Ruiz's solo homer, his second home run of the season, in the top of the fourth that momentarily created a 1-1 tie.
Ruiz finished with three of the Phillies' 10 hits.
The Giants, who had lost eight of their previous nine games, smacked eight extra-base hits among their 22 hits. Pence and Panik crushed homers, Maxwell had two doubles and a triple, and first baseman Brandon Belt collected two doubles.
Belt, Bumgarner, Pagan, Panik, Duffy and catcher Buster Posey all had hits in the eight-run fourth before Pence connected off Hamels (5-7) for his fifth career grand slam. It was the Giants' fifth slam of the season.
"Sometimes it can be tough," Hamels said. "Sometimes you just have to battle and sometimes it doesn't go your way."
Panik's homer, his seventh of the season, was a two-run shot off reliever Jeanmar Gomez in the seventh.
The loss was the Phillies' third in a row and dropped them to 2-6 on their current 10-game trip. Center fielder Ben Revere and right fielder Domonic Brown had two hits apiece.
Hamels was pulled one out into the Giants' huge fourth inning, marking his shortest outing of the season. He had allowed just seven runs in his previous four starts.
The Giants, meanwhile, had scored just 10 runs in their previous 56 innings, including one in the first inning on Friday before exploding against Hamels in the fourth.
Before Pence's grand slam, the key at-bat of the inning could have been Bumgarner's.
Batting with one out and runners on first and second in a 1-0 game, Bumgarner was looking to hand the Phillies a second out with a sacrifice bunt until Hamels had trouble finding the strike zone. The 2014 Silver Slugger Award winner among National League pitchers then pulled back and singled to left field, loading the bases with one out.
Pagan, Panik, Duffy and Posey followed with singles to score the first four runs in the inning before Pence' shot into the right field pavilion.
NOTES: The last time the Giants had three players with four or more hits in the same game was in 1965 when OF Jesus Alou, C Tom Haller and SS Hal Lanier accomplished the feat against the Houston Astros. ... The Giants hadn't scored eight runs in one inning against one pitcher since they did it to Chicago Cubs RHP Ryan Dempster in 2010. ... The game's starting pitchers -- Phillies LHP Cole Hamels and Giants LHP Madison Bumgarner -- are former World Series Most Valuable Players. Hamels won in 2008 and Bumgarner did so last season. ... The pitching matchup of Series MVPs was the 44th in major-league history and first since Hamels faced Washington Nationals RHP Livan Hernandez on Aug. 12, 2011. ... The Phillies will promote RHP David Buchanan from Triple-A Lehigh Valley on Saturday and start him in the middle game of the three-game series. Buchanan lost five consecutive starts with an 8.76 ERA before getting demoted in May.