SAN FRANCISCO — Ace pitcher Logan Webb took the brunt of the punishment Wednesday as the Giants fell 8-4 to the Kansas City Royals to conclude a nine-game homestand.

The Giants took another body shot after the game when it was revealed starting pitcher Justin Verlander will go on the injured list and miss at least two starts with a pectoral irritation.

Verlander was affected by the injury in his previous start against the Athletics, throwing four innings, topping out at 93 miles per hour and struggling with his location, walking five batters.

The injury, Verlander said, was unelated to a nerve injury in his neck that cost him two months of the 2024 season.

“I think it’s something that hopefully is easy to deal with and I should be back pretty quickly,” Verlander said. “I think I was borderline being able to pitch, but they didn’t want me to go out and risk injury. They’re saying, just give yourself a blow. Take the 15 days and get this thing behind you.”

The Royals (28-23) took two of three in the series, with the Giants (29-21) missing a chance to go 10 games over .500 before going on a nine-game eastern swing to Washington, Detroit and Miami.

The Giants had solo home runs from Matt Chapman in the third inning, his ninth of the season, and Patrick Bailey in the fourth, his first, before a home crowd of 29,064. Heliot Ramos hit a two-run home run in the ninth, his ninth of the season, to account for the last two runs.

Longtime catcher Salvador Perez, playing first base for the Royals, hit a two-run home run in a three-run fourth inning that chased Webb.

Webb gave up a season-high 10 hits in his four innings, with his record falling to 5-4. The first eight hits off Webb were singles, before Bobby Witt Jr.’s run-scoring double and Perez’s two-run opposite field homer in the fourth. At that point, the Giants trailed 6-1.

It was Webb’s shortest outing of the season -- he’s gone five inning three times -- and it came on a day when the bullpen was depleted and manager Bob Melvin had to be hoping for at least seven innings. In Webb’s three previous starts he went seven innings twice and then eight innings against the Athletics. It was the first time since Sept. 13, 2024 that he failed to reach the fifth inning.

“I thought they had a good approach,” Webb said. “I think going in I knew it was going to be kind of a grindy game because that’s a team I don’t necessarily match up with.

“They’re pretty good against two-seams (fastballs), they don’t chase a ton, they make a lot of contact. I thought the momentum was good after yesterday then I go out there and give up three straight hits to start.”

Kansas City’s hit parade started immediately with a ground single by Maikel Garcia, another ground single by Witt and a run-scoring single by Vinnie Pasquantino before Webb recovered to strike out the next three hitters.

Michael Massey started things in the second with a one-out single, followed by another by No. 9 hitter Kyle Isbel. Garcia’s second single drove in the second run, with Witt lining to right for a sacrifice fly to make it 3-0.

Webb righted himself with an 11-pitch scoreless third — even though he gave up two more singles — before the lead expanded in the fourth.

First baseman LaMonte Wade Jr. mishandled the ball on a grounder to first by Isbel to lead off the inning, followed by a would-be double play on a comebacker where Webb couldn’t get the ball out of his glove. Instead, he recorded only an out at first.

Pasquantino struck out before Perez homered for a 6-1 lead. All three runs were unearned due to the inning-opening error.

“He got some balls up,” Melvin said. “That’s a pretty good hitting team. I give them some credit. It was just kind of an off day for Logan.”

The Royals, after roughing up Webb, didn’t let up when Spencer Bivins entered to start the fifth. Drew Waters doubled, Freddy Fermin singled and Massey singled in a run. Following a sacrifice, Garcia hit a sacrifice fly to make the score 8-2.

Bivens threw two more scoreless innings, with Jordan Hicks pitching the eighth and Erik Miller the ninth.

It was a bullpen game for the Royals , who opened with Daniel Lynch IV (1 1/3 innings), followed by Jonathan Bowlan (1 1/3), Steve Cruz (two), Taylor Clarke (two), Angel Zerpa (one) and ex-A’s reliever Lucas Erceg (one). Bowlan (1-0) was credited with the win.

Rotational plans

Melvin wasn’t ready to say how the rotation will shake out minus Verlander. The Giants have already made one move, replacing Hicks with Hayden Birdsong. He reiterated the injury does not appear to be serious.

“I don’t think it’s really good bad,” Melvin said. “It didn’t feel horrible, but he wasn’t in position to make his next start. Looking at our bullpen usage and where we are it made sense to make sure he’s 100 percent the next time around.”

One possibility is left-hander Kyle Harrison, who has responded well to a relief role — similar to Birdsong — since being promoted from Triple-A Sacramento.

“I’m super excited about some of these young guys that will get opportunities,” Webb said. “I’m real excited about Harry.”

Ramos on a tear

After going 2-for-5 with a home run, Ramos extended his on-base streak to 14 games and his hitting streak to seven games. Since April 26, Ramos is slashing .397/.467/.679 with 17 runs scored, four doubles and six homers.