BALTIMORE — The Baltimore Orioles did not use a home run while scoring 13 runs in Wednesday’s victory over Boston. That strategy shifted a bit in the series finale on Thursday.

Manny Machado hit a tiebreaking three-run homer, while Adam Jones and Mark Trumbo belted two homers apiece as the Baltimore Orioles recorded a season-high seven in Thursday’s 12-7 victory over the Boston Red Sox.

The Orioles (30-22) often have worked at manufacturing runs this season, something they did well on Wednesday. But on Thursday, it became pure power, as they scored all of their runs on homers, even though manager Buck Showalter just wanted to be sure they scored in some form to earn a split of the series after dropping the first two.

“Runs are runs,” Showalter said. “You’re going to need all you can get against them. But it was nice to score that many runs regardless because our guys just decided they were going to outscore them. Or you’re just woe is me.”

The power display was the fourth time in club history — since the team came to town in 1954 — that the Orioles hit at least seven homers.

Trumbo and Jones each hit two-run and solo shots but it was Machado’s homer in the seventh off Junichi Tazawa that snapped a 5-5 tie and gave Baltimore the lead for good.

Pedro Alvarez added his solo shot in the eighth that made it 9-5. Francisco Pena, in his first game with the Orioles, also hit a two-run homer later in the inning — his first in the major leagues.

“When I was growing up, being in a ballpark with my dad. Every little kid has that dream,” said Pena, the son of former major league catcher Tony Pena. “It’s the first home run in the big leagues. It was real happy. It was a great feeling.”

Jones hit his second later in the three-homer inning to make it 12-5. That was his 200th career homer as an Oriole.

“It means I’ve been here a long time and been fortunate enough to stay healthy, fortunate enough to play in a ball park like Camden Yards that is what I still think is the most beautiful park in all of baseball,” Jones said. “Just having my teammates behind me day in and day out. I play for them, I play for myself and I play for what’s on my chest.”

Boston manager John Farrell said his pitchers simply did not make enough good pitches against a team that’s got plenty of power. The seven homers allowed tied a Red Sox (32-22) record.

“Pitches up in the strike zone and nothing to hold the ball back, particularly in this ballpark when it heats up,” Farrell said. “Their power was certainly on display here tonight.”

Mychal Givens (4-0) earned the victory with two innings of scoreless relief after starter Ubaldo Jimenez stumbled in the sixth.

Robbie Ross Jr. (0-1) took the loss.

Boston rallied after a slow start and knocked out Jimenez with a five-run sixth. Xander Bogaerts stretched his hitting streak to 26 games with a two-run single, and David Ortiz followed with a three-run homer that gave the Red Sox a 5-4 lead.

The Orioles quickly tied it when Trumbo hit his second homer of the night, a solo shot to center in the bottom of the sixth, and took off from there.

Baltimore finally took an early lead in the series on Trumbo’s two-run homer off starter Rick Porcello with one out in the fourth. Trumbo lined a 1-2 pitch into the left-field seats for a 2-0 lead.

The Orioles used the same method to take a 4-0 lead one inning later when Jones hit a two-run homer to left — his first since May 14.

Jimenez breezed through the early innings. He retired the first eight batters before walking Christian Vazquez. The Red Sox did not get a hit until Hanley Ramirez singled to start the fifth, but Jimenez retired the next three batters before Boston woke up in the sixth.

“A lot of offense with both teams scoring a lot of runs,” Bogaerts said. “We just came up short today. If we just keep swinging the bats, (there’s a) better chance we are going to win.”