Alec Bohm had four hits and four RBIs, including a three-run homer, and the visiting Philadelphia Phillies wrapped up their third straight playoff berth in style by blowing out the New York Mets 12-2 on Friday night.

Nick Castellanos had three hits and two RBIs, J.T. Realmuto added a two-run homer and the Phillies (92-62) extended their NL East lead to seven games over the second-place Mets (85-69) with eight to play.

Assured at least a National League wild card, the Phillies can secure their first division title since 2011 with one more win this weekend against the rival Mets at Citi Field.

Philadelphia’s victory coupled with Atlanta’s 4-3 loss in Miami eliminated the Braves from contention for the NL East crown — ending their six-year reign atop the division.

New York, which had won four in a row and 16 of 20, remained two games ahead of Atlanta for the final NL playoff spot.

Philadelphia stole five bases — four in a six-run fourth inning capped by Bohm’s homer off reliever Adam Ottavino. Johan Rojas had a two-run double off starter David Peterson (9-3), pulled after 3 2/3 innings.

Cristopher Sánchez (11-9) overcame a shaky start and five walks in five innings for the win.

ORIOLES 7, TIGERS 1 >> Colton Cowser hit his 21st and 22nd homers, James McCann added his sixth and seventh and Baltimore went deep a season-high five times in a home win over Detroit.

Anthony Santander contributed his 43rd round-tripper off Tigers opener Tyler Holton (7-2) as the Orioles won consecutive games for the first time in more than two weeks.

Corbin Burnes (15-8) pitched seven shutout innings to lower his ERA to 2.95. The Tigers had won their previous four entering Friday.

Keider Montero yielded Baltimore’s final four homers over five innings of middle relief for the Tigers.

MARLINS 4, BRAVES 3 >> Jake Burger had a run-scoring double, helping Miami (57-97) dent visiting Atlanta’s playoff chances.

Valente Bellozo (3-4) allowed three runs and seven hits in 5 1/3 innings to get the win.

Charlie Morton (8-9) gave up four runs and seven hits in six innings and threw a run-scoring wild pitch. He is 0-2 in his last three starts.

The Braves’ Ozzie Albies, a switch-hitter batting right-handed only, was 0 for 4 in his return from a fractured left wrist that had sidelined him since July 21.