LOS ANGELES — J.D. Martinez hit four home runs for the Arizona Diamondbacks on Monday night, tying the major league record in a startling power show at Dodger Stadium.

And get this: He struck out his first time up, then connected four times in a row, including shots in the seventh, eighth and ninth innings.

“It’s a blessing,” he said.

Martinez became the 18th player in big league history to accomplish the feat and first for Arizona. He’s the 16th overall to do it since 1900 — Scooter Gennett of the Cincinnati Reds hit four straight homers on June 6 against St. Louis.

Martinez hit a two-run homer in the fourth off Dodgers starter Rich Hill. He hit a solo drive off Pedro Baez in the seventh and another solo shot off Josh Fields in the eighth.

Going into the ninth, Martinez was due up fifth. After three batters safely reached, Martinez stepped to the plate with history only one swing away.

“Let’s go up there and keep doing what you’re doing,” he said he told himself.

Martinez capped his huge night by pulling a two-run homer to left field off Wilmer Font. The big hits helped Arizona rout the NL West-leading Dodgers 13-0 for its 11th straight win.

“You want the game to keep going,” he said.

Martinez now has 34 home runs this season, 18 since being traded from Detroit to the Diamondbacks in mid-July for minor leaguers.

The 30-year-old outfielder hit a career-high 38 homers for the Tigers in 2015 when he made the AL All-Star team.

Martinez joined the likes of Hall of Famers Willie Mays, Mike Schmidt and Lou Gehrig with four-homer games. All-Star sluggers such as Josh Hamilton, Carlos Delgado and Gil Hodges also did it, along with lesser-known players such as Pat Seerey.

“I work really hard on my craft,” Martinez said.