DENVER — The Miami Marlins closed out June with a 14-3 rout of the Colorado Rockies at Coors Field, capping a 20-win month that vaulted the club from the National League basement to six games over .500 at 46-40.

Miami became the first team in Major League Baseball history to enter a calendar month eight-plus games under .500 and finish it six-plus games over .500, according to the Elias Sports Bureau. The 20-win June was just the second time in franchise history the Marlins won that many games in a single month, matching May 2012’s 21-win mark. Their +53 run differential was the best in club history.

“Maybe it took us getting our butts kicked three days in a row in Citi Field to send shockwaves through [us] a little bit, that we can decide how we want our season to go,” manager Clayton McCullough said. “It’s one thing to play well, and for someone to beat you, it’s another to just not perform up to your capabilities, and [up to] a standard that we’re trying to set here for ourselves. And so after some point, you just have to get fed up with it, and have to go play better.”

On May 31, the Marlins sat at 26-34 — eight games below .500 and owners of the National League’s third-worst record — after being swept by the Mets in Queens. Injuries to Robby Snelling, Eury Pérez and Janson Junk had gutted the rotation. Yet the pitching staff finished June with MLB bests in ERA (3.01), opponents’ batting average (.220) and OPS (.639). Starters ranked second in ERA (3.18), sixth in opponents’ batting average (.227) and fourth in OPS (.657).

Pérez, in his second start back from the injured list, allowed just one run on two hits over 5 1/3 innings. “Once I got to the IL I told them, ‘It’s not going to be for long,’” Pérez said via interpreter Luis Dorante Jr. “‘I want to be back.’ You can see when there’s a run, a base hit, the way we cheer and enjoy the game is actually contagious. … It’s an incredible group we have. Hopefully it stays the same group we have, and we go to the playoffs with the same group.”

The Marlins set season highs for runs and hits (21) in the finale, with six players finishing with multiple hits and seven driving in at least one run. Owen Caissie, Joe Mack and Javier Sanoja — who finished a home run shy of the cycle in the series opener — all went deep. Rookies Caissie (453 feet) and Mack (450 feet) became the second Marlins duo to crush homers of at least 450 feet in the same game, joining Christian Yelich and Giancarlo Stanton from May 6, 2016.

“Not to say we’re getting comfortable, because that’s a bad thing, but we’re settling in, we’re hitting our stride, and really showing what the Marlins can do,” said Caissie, who posted a combined .850 OPS in May and June after a .469 OPS in April. Mack, who has thrown out an MLB-high 15 baserunners since his Major League debut on May 4, posted a .904 OPS in June after a .500 OPS in May.

“Winning 20 games a month is a hard thing to do, and so [it’s a] great way to finish out the month,” McCullough said. “We certainly have a lot of work ahead of us, but again, to continue to play well in a lot of facets is what’s led to this.” Miami, six games over .500 for the first time since the end of the 2023 season when the club claimed a National League Wild Card spot, opens July looking to sustain the surge through the second half.