SCOTTSDALE, Ariz. — With six days remaining until the start of the regular season, Giants’ ace Madison Bumgarner was set to make his fifth career Opening Day start.

But on the final day of the Giants’ Cactus League slate, disaster struck.

In the third inning of a contest against the Kansas City Royals, Bumgarner was hit in the hand by a line drive from leadoff hitter Whit Merrifield. The liner displaced the fifth metacarpal in Bumgarner’s pitching hand, sidelining him indefinitely.

Bumgarner is scheduled to undergo surgery Saturday to have pins placed in his hand, and said he’ll likely have the pins removed in four-to-six weeks. The Giants’ ace will not be able to throw until the pins are taken out, so his rehab will begin, at the earliest, around the end of April.

“I’m going to have some pins put in tomorrow, there was no way around that,” Bumgarner said. “Got to do that in the morning and hopefully it heals the way it’s supposed to and gets back quick.”

Bumgarner missed nearly half of last season after separating the shoulder in his pitching arm when he fell off a dirt bike in Colorado last April. He said Friday he does not consider this injury “as threatening” as the one he suffered last year, and expects to return prior to the All-Star break.

“This is not near as big a deal,” Bumgarner said. “It’s your pinky and knuckle, it’s just got to heal up, it’s basically it.”

The injury to Bumgarner is the second to a Giants’ starting pitcher in as many days, as Jeff Samardzija was diagnosed with a strained right pectoral muscle on Thursday.

Samardzija exited a Wednesday start at the Cubs’ Minor League facility after 73 pitches and said he felt fine, but manager Bruce Bochy revealed Thursday that Samardzija needed an MRI on his pitching shoulder. Bochy said Samardzija won’t throw for the next week, but could be back in the Giants’ rotation within the next month.

Bumgarner’s injury sucks the depth out of a starting rotation that ranked among the Giants’ greatest question marks entering the regular season. Bochy called the loss of the four-time All-Star “horrible news.”

“It’s just a downer,” Bochy said. “This was his short day and really I feel for him. We know what he means to us. But where he was, how well he was throwing the ball all spring, unfortunately you’ve got to deal with these things.”

Bochy said the Giants have yet to determine who will start on Opening Day in Los Angeles Thursday, as right-hander Johnny Cueto was slated to throw in Friday’s game.

The Giants originally scheduled Cueto to pitch an exhibition against the Triple-A Sacramento River Cats this Saturday, but pushed him back to Sunday so that he could begin the regular season on normal rest.

Cueto is the most likely candidate to slide up to the top of the Giants’ rotation, but with two pitchers expected to miss significant time early in the year, Bochy said he’ll discuss the club’s various options with general manager Bobby Evans.

Entering the weekend, Cueto, Chris Stratton, Ty Blach and Derek Holland are expected to begin the year in the team’s rotation. Holland began the spring as a non-roster invitee fighting for a roster spot, but now, the Giants will likely depend on him to log critical innings during the opening series.

“These are two heavyweights that have carried this team,” Holland said. “I would like to hope that I’ve earned my way to get in here and not because of what happened to these guys. I don’t want to take anything away from them, they’ve accomplished so much and to see it come down to the last day for Bummy today, that sucks.”

Though early-season off days won’t require the Giants to use a fifth starter until April 12, it’s unlikely Samardzija will be healthy enough to rejoin the rotation by then. The franchise does have two prospects preparing to begin the year with Triple-A Sacramento, Tyler Beede and Andrew Suarez, who are now candidates to make the Major League roster.

“There’s no replacing Madison, obviously,” third baseman Evan Longoria said. “But the guys have thrown well, some of them have thrown deep into games. We have a couple of guys at the Triple-A level that are pretty close to being ready too and we’ll probably lean on those guys more than we would.”

Another avenue the Giants could take toward adding pitching depth is combing through the names of players who will be released by other clubs in the coming days. With several teams still weighing roster decisions, the Giants may look to add a starting pitcher who will soon be released by another club.