Perhaps everybody should have seen it coming, given the way the Marlins’ 22-10 win over the Rangers started Wednesday, with Dee Gordon launching the first pitch of the game from Yu Darvish nearly 400 feet into the stands in right field for a home run.

But that was just the beginning. No one could have predicted or expected what ensued, the most prolific offensive night the Marlins have ever had.

Highlighted by a nine-run fourth inning, Miami’s 22 runs were a new franchise record.

“Our guys swung the bat good,” said manager Don Mattingly, rather subdued and in understatement even by his standards.

The night was a good one for padding batting averages, slugging percentages and RBI totals. Every Marlins starting position player had at least one RBI. All except first baseman Tomas Telis had multiple hits. All except shortstop Mike Aviles had at least one run scored.

Giancarlo Stanton hit a ball 468 feet to left-center for his 33rd homer of the year, tops in the majors. Marcell Ozuna, who drove in five runs, became the first Marlin ever to double and triple in an inning when he did it in the fourth. J.T. Realmuto homered to cap that big frame, his 11th of the season, matching his career-high total from last year.

Christian Yelich had three doubles and a homer, giving him seven extra-base hits in his past two games.

“You have stretches where you can’t get one to save your life and then you get a couple in a row,” Yelich said.

Derek Dietrich, enduring the worst season of his major league career, matched Ozuna with five RBI. Ichiro Suzuki went 2 for 3, walked thrice and scored thrice.

The game got out of hand in the late innings, with two Miami runs in the seventh, five in the eighth and four in the ninth.

Catcher Brett Nicholas pitched the ninth inning for Texas. He allowed four runs. One of his pitches was a 45-mph knuckleball to Ichiro.

“You still have to play baseball, but you don’t want to be trying to do anything extra,” Mattingly said. “You get to a point when you’re not going to keep running, [but] if a guy hits a ball in the gap you have to run. If a guy throws a ball to the backstop you have to score.”

Among the Marlins’ victims: Rangers righty Darvish, considered a trade target of at least a couple of contenders, who allowed a career-high 10 runs.

Reliever Jason Grilli pitched one-third of an inning and allowed four runs, including one on Stanton’s homer. Stanton celebrated with fist pumps and a couple of hops on his way to first base — an overzealous celebration one night after a similar show of emotion from Grilli after he struck out Stanton.

“That was just for his reaction last night,” Stanton said. “When you have a reaction like that in a game that doesn’t matter or that out is not the deciding factor in the game, I'm going to do the same if I get you.

“I don't like to do that. But you do it for me, for whatever reason, multiple times, that's what happens.”

Rangers third baseman Adrian Beltre, he of the 2,996 career hits, was ejected in the eighth inning. Second-base umpire Gerry Davis asked Beltre to stand in the on-deck circle, as opposed to a few feet to its left, and Beltre responded creatively, dragging the on-deck circle to where he was standing.

Davis tossed him, then Rangers manager Jeff Banister, who came out to argue.

“It's one of the funniest things I've ever seen,” said Marlins reliever Drew Steckenrider, who was on the mound during the exchange.

The Marlins pitched Wednesday night, too, believe it or not. Nine whole innings. It didn’t go well. Jose Urena allowed five runs in five innings. Brian Ellington walked two and hit two batters in his 29-pitch ninth inning.

But for at least a game, the Marlins’ bad pitching didn’t really matter.

“It was,” Yelich said, “one of those weird baseball nights.”

thealey@sunsentinel.com; @timbhealey

To sign up for the Sun Sentinel’s Marlins newsletter, click here.