CLICK HERE if you are having a problem viewing the photos on a mobile device

MIAMI–When Madison Bumgarner left the mound in the sixth inning Monday night, the Giants ace figured a night of confrontations with home plate umpire Jeremie Rehak might reach a climax.

He was right.

Rehak watched Bumgarner walk off the field, Bumgarner barked at him and then watched the rest of the Giants’ 7-5 loss to the Marlins from the visiting clubhouse after being ejected for the first time in his major league career.

“I could tell that he wanted to toss me,” Bumgarner said. “And I said, ‘Go Ahead’. I might have given him a little extra encouragement after that.” Get San Francisco Giants news in your inbox. Sign up now for the free Giants HQ newsletter.

Bumgarner took issue with Rehak’s strike zone during “every inning” of Monday’s start, which lasted 5 1/3 frames and ended after Marlins center fielder Lewis Brinson clubbed a game-tying single in the sixth.

“That’s a game that we should have won,” Bumgarner said. “I let it get away from me and I let them back in it. When we play like we did today offensively, battling to score runs, especially when you jump out in front like that, I’ve got to do better.”

In his second start of the year after missing more than two months with a fractured pinky, Bumgarner surrendered four earned against a Marlins team that entered the contest tied for the worst mark in the National League with 23 wins.

“It’s his second start and he’s only going to get better,” manager Bruce Bochy said. “He needs to pitch. He’ll get to where he needs to be and he was really good early, he just made some mistakes.”

After the Giants took two of three from the first-place Washington Nationals over the weekend, a pitching staff that entered with a 2.44 ERA in the month of June allowed seven runs to the Marlins.

San Francisco surrendered three separate leads Monday, including a 5-4 advantage in the bottom of the seventh that evaporated after a two-out RBI double from Brian Anderson tied the game against Sam Dyson. Miami’s next hitter, J.T. Realmuto, crushed a 412-foot home run to put the Marlins ahead for good.

The Giants rallied to break a 4-4 tie in the top of the seventh after Andrew McCutchen led off the inning with a hit by pitch and came around to score on a Brandon Crawford sacrifice fly. Crawford was also at the plate when the Giants took their second lead of Monday’s game, but his plate appearance in the top of the fifth followed a bizarre sequence most opposing managers would have attempted to avoid.

The hottest hitter in baseball and the odds-on favorite to start the All-Star Game at shortstop for the National League is probably the last player a team wants to face with the bases loaded, but the Miami Marlins aren’t like most clubs.

Following a game-tying double from McCutchen with one out in the top of the fifth, Marlins skipper Don Mattingly called for an intentional walk of Evan Longoria to fill the bases for Crawford.

The free pass allowed starter Wei-Yin Chen, a southpaw, a chance to square off with the left-handed hitting Crawford with force outs at every base. But after the Giants infielder slammed three hits off reigning Cy Young winner Max Scherzer Sunday to improve his average to .439 since May 1, few, if any, managers would consider a showdown with Crawford a more favorable matchup.

The drama stemming from a potential Chen-Crawford battle was short-lived. Before the Marlins lefty threw a pitch, he balked home the go-ahead run.

Mattingly then chose to intentionally walk Crawford before he removed Chen from the game. It was a curious scheme at best and it continued to backfire after reliever Brad Ziegler walked Nick Hundley on four pitches to plate McCutchen and give the Giants a 4-2 edge.

“He wanted the left-handed matchup there but I want (Crawford) up there,” Bochy said. “The balk, who knows, that might have hurt us. Although Nick got a walk and then they got out of it. It would have been nice to get a big hit there to put it away.”

With the bases loaded and one out, the Giants failed to add on and Bumgarner failed to hold the advantage in the bottom of the sixth. Cameron Maybin hit a sacrifice fly and Brinson, who entered the game hitting .162, delivered an RBI single to left field that ended Bumgarner’s night.

“I thought he threw the ball good,” Hundley said. “He was really forced into a high pitch count unfortunately but they hit some good pitches.”

The Giants manager, starter and catcher agreed the strike zone was tight for both sides Monday, which created a greater challenge for a pitcher who hasn’t had much time to round into form.

“My stuff is good enough to get people out right now, I’ve just got to execute and that’s it,” Bumgarner said. “I just didn’t do that tonight.”