BALTIMORE — The way Nelson Cruz and the Baltimore Orioles are hitting this season, it may not matter much who pitches for the other guys.

Cruz and J.J. Hardy homered, and the Orioles hammered out 12 hits in defeating Cy Young Award winner Max Scherzer and the Detroit Tigers 12-3 Thursday in the opener of their AL Division Series.

Rookie Jonathan Schoop had two hits and two RBIs for the Orioles, who turned a close game into a rout with an eight-run eighth inning against Scherzer and three ineffective relievers.

The 12 runs set a postseason record for Baltimore, making its second playoff appearance since 1997.

Game 2 of the best-of-five series is Friday at Camden Yards. Justin Verlander, the second of three straight Cy Young winners the Orioles will face, is set to go against left-hander Wei-Yin Chen.

Cruz led the majors with 40 homers during the regular season, a good portion of Baltimore’s big league-best 211 long balls. His first-inning drive off Scherzer put the Orioles up 2-0 before Detroit’s Victor Martinez and J.D. Martinez connected off winner Chris Tillman in the second to tie it.

But Baltimore had too much firepower for the Tigers. Hardy homered leading off the seventh for a 4-2 lead, and Cruz added his third RBI with a single during a wild eighth inning keyed by a Detroit error that kept the boisterous, orange-clad crowd of 47,842 on its feet.

Tillman (1-0) allowed two runs in five innings before Andrew Miller got five outs — three by strikeout. Darren O’Day gave up an eighth-inning homer to Miguel Cabrera, but the drive followed a double play.

Baltimore manager Buck Showalter then called upon closer Zach Britton, who had 37 saves during the regular season. Britton got the last out in the eighth, and by the time the ninth inning rolled around, he wasn’t needed anymore.

Miller had a 1.35 ERA in 23 games with Baltimore, O’Day finished at 1.70 and Britton closed at 1.65. That’s one big reason why the AL East-champion Orioles were 80-4 when leading after eight innings.

Meanwhile, Detroit’s revamped bullpen has looked shaky — although it was shortstop Andrew Romine’s error that got the big eighth inning going.

Pitching against Baltimore for the first time since 2013, Scherzer allowed five runs and seven hits in 7.1 innings. The right-hander was 18-5 during the regular season, but in this one he was burned by the long ball and outpitched by the Orioles.

Although he had a 5.56 ERA in the first inning during the regular season, Tillman began his initial foray into the playoffs in impressive fashion by striking out the side on 14 pitches.

Cruz hit an opposite-field drive to right in the bottom half after Nick Markakis hit a leadoff single. It was his 15th career postseason home run, tied with Babe Ruth for 10th place on the career list.

The rollicking, towel-waving fans had barely settled down when Victor Martinez led off the second with a towering shot over the right-field wall. Four pitches later, J.D. Martinez hit a tying homer in his first postseason at-bat.

Markakis answered with an RBI single in the Baltimore half. At that point, six of 10 batters reached safely against Scherzer.

After yielding the back-to-back homers, Tillman retired the next 11 batters before Romine singled with two outs in the fifth. Another single and a walk loaded the bases for Torii Hunter, who hit into a fielder’s choice on Tillman’s 105th and final pitch.