MIAMI (AP) Andrew Cashner was hardly the only Marlins pitcher who couldn’t get Brandon Crawford out.

Working in relief for the first time in three years, Cashner allowed Crawford’s record-tying seventh hit Monday night, a go-ahead single in the 14th inning that sent the San Francisco Giants to an 8-7 victory over the Marlins.

Out of other options in the bullpen, Miami turned to Friday’s scheduled starter with the game on the line.

“I just have to be ready when my number’s called,” Cashner said. “My role is to pitch. It doesn’t matter if you start or relieve.”

Crawford became the first major leaguer in 41 years to get seven hits in a game. His hits came off six different pitchers.

“What do you have to do to get that guy out? I don’t know,” Marlins manager Don Mattingly said. “We didn’t figure it out today. He’s a tough out right now and obviously, when you’re getting seven hits, you’re feeling pretty good about yourself. So I’m sure this whole series, it’s not going to be fun trying to get him out.”

The previous player to get seven hits was Pittsburgh Pirates infielder Rennie Stennett on Sept. 16, 1975, at the Chicago Cubs. He did it in nine innings, the only big leaguer to accomplish that feat since before 1900.

Crawford, who entered in a 6-for-36 slide, raised his batting average 13 points to .278. The shortstop tripled, doubled and had five singles in eight at-bats, tying the NL record for hits in one game.

“A great performance,” said Giants bench coach Ron Wotus, who filled in as manager after Bruce Bochy was hospitalized with an illness.

“Bochy picked a heck of a day to take off.”

The only major league player besides Stennett to get seven hits in a nine-inning game was Wilbert Robinson for the old Baltimore Orioles of the National League in 1892.

Johnny Burnett holds the major league mark for an extra-inning game with nine hits for Cleveland in a 1932 contest that lasted 18 innings.

“It doesn’t happen very often that you get eight at-bats in a game so I figured it didn’t happen a whole lot, but you don’t think about stuff like that when you’re playing,” Crawford said.

His seven hits set a franchise mark.

“Pretty crazy,” Crawford said.

Christian Yelich homered and tied a career high with four RBIs for the Marlins. Martin Prado also went deep and drove in two runs. They hit back-to-back homers in the fifth.

Cashner, still slated to start Friday, entered in the 14th to face Crawford with two on and he lined a single to center field that scoredBrandon Belt for an 8-7 lead.

George Kontos (3-2) pitched two scoreless innings to earn the victory.

The Marlins took a 5-1 lead into the seventh behind a solid outing from Jose Fernandez, who allowed one run and six hits in six innings. He struck out six and threw 106 pitches.

“I would have liked to do a couple of things differently and make some adjustments and not throw that many pitches,” Fernandez said. “I feel healthy and I gave my team a chance to win. That’s all I can ask for.”

The Giants were without Bochy, admitted to a Miami hospital in the morning after feeling ill. He was to be monitored overnight and is expected back on the bench Tuesday night.

San Francisco went 6 for 21 with runners in scoring position and left 18 on base in a game that took 5 hours, 34 minutes – the longest of the season for both teams.

“Exhausting,” Crawford said. “I’m tired right now.”

The Giants threatened in the 13th when Crawford hit a one-out triple off Dustin McGowan (1-3). After the second out, Mattingly intentionally walked two batters to get to the pitcher’s spot in the order.

The Giants were out of position players, leaving ace pitcher Madison Bumgarner, a .183 hitter with legitimate power, to pinch-hit with the bases loaded. He struck out to end the inning.

San Francisco scored five times in the seventh off three relievers and started the inning with six consecutive hits on its way to a 6-5 lead.

Miami responded with Yelich’s two-run single. Crawford’s single in the eighth tied it at 7.

“We bounced back,” Mattingly said. “They bounced back and from there it was crazy after that.”

Giants starter Johnny Cueto allowed five runs in five innings.

WAY TO GO, ICHIRO

Marlins outfielder Ichiro Suzuki received a standing ovation before his pinch-hit appearance in the sixth after getting his 3,000th career hit Sunday in Colorado. Suzuki tipped his helmet in appreciation before grounding out in his only at-bat.

TRAINER’S ROOM

Marlins 1B Justin Bour (ankle) has taken a break from his rehab stint, citing soreness, but could return to the big league club on this homestand, which ends Sunday. “We’re hopeful, but it’s probably a 50-50 thing,” Mattingly said.

UP NEXT

Giants: LHP Matt Moore (7-7, 4.04 ERA overall) makes his second start with San Francisco on Tuesday after being acquired in a trade with Tampa Bay.

Marlins: RHP Tom Koehler (8-8, 4.05) is 2-0 with a 0.90 ERA in his last three starts.