BALTIMORE (AP) An engaging four-game series between the two top teams in the AL East ended exactly how it started: with the Boston Red Sox clutching onto a one-game lead over the Baltimore Orioles.
Mark Trumbo and Adam Jones each homered twice, Manny Machado delivered a tiebreaking drive in the seventh inning and Baltimore hit a season-high seven long balls in a 12-7 victory Thursday night.
Pedro Alvarez and Francisco Pena also connected for the Orioles, who earned a split of the four-game series after dropping the first two by a combined 13-4 score.
''A lot of people would have folded the tent after the first two games,'' Baltimore manager Buck Showalter said, ''but our guys got their dander up a little bit and wanted to show everybody that we could score a few runs, too.''
One night after ringing up a season-high 13 runs without benefit of a home run, the Orioles returned to their go-to style of offense: pure power.
''Follow the lead of the guys in front of you,'' Jones said. ''Get good pitches to hit and drive them out the park.''
Boston's Xander Bogaerts extended his career-high hitting streak to 26 games with a two-run double and David Ortiz hit his 16th homer to give the Red Sox a temporary 5-4 lead in the sixth.
Quite simply, Boston couldn't score enough to keep up with Baltimore's hit parade. The Red Sox tied a team record by giving up seven home runs.
''A lot of offense with both teams scoring a lot of runs. We just came up short today,'' Bogaerts said. ''Hopefully, we just continue to swing the bats and the pitching will take care of itself.''
The Orioles hit their most homers in a game since connecting eight times last June 16 against Philadelphia.
Trumbo put Baltimore up 2-0 in the fourth inning, Jones added a two-run drive in the fifth. Trumbo then evened the score at 5 in the sixth after the Red Sox roughed up Ubaldo Jimenez in the top half.
In the seventh, Robbie Ross (0-1) walked Ryan Flaherty and gave up a single to Pena before retiring the next two batters. Boston manager John Farrell then summoned Junichi Tazawa to face Machado, who drove the right-hander's second pitch deep into the left-field seats.
The Orioles added four runs in the eighth. Alvarez hit a solo shot off Tazawa, Pena launched the first of his career off Noe Ramirez with a man on and Jones followed with his 200th home run with Baltimore for a 12-5 lead.
Farrell knows the Red Sox can't count on hitting enough to make up for bad pitching.
''We continue to have a very good offensive approach,'' he said. ''Yet, the inability to locate consistently is the difference in the last two ball games, compared to the first two of the series.''
Mychal Givens (4-0) pitched two scoreless innings for the Orioles, who next host the AL East rival Yankees for three games.
Jimenez came into the game looking to solidify his tenuous hold on a spot in Baltimore's starting rotation after allowing 15 runs in his previous three outings.
The right-hander retired the first eight batters and yielded only one hit through five innings before running into a whole lot of trouble in the sixth.
A single, a double and a walk loaded the bases for Bogaerts, who doubled off the center-field wall. Ortiz followed with a three-run shot into the right-field stands.
''They just came out swinging,'' Jimenez said. ''They hit pretty much everything I threw. I threw a couple fastballs up. In the first five innings, everything was down. I just got bit in that inning.''
Boston didn't score again until the ninth.
Red Sox starter Rick Porcello went six innings and gave up five runs and six hits, including a career-high tying three homers.
The Orioles optioned RHP Mike Wright to Triple-A Norfolk, one day after he yielded four HRs in a loss to Boston. Baltimore purchased the contract of LHP Brian Duensing from Norfolk. Duensing pitched the ninth and gave up two runs and four hits.
Orioles: Yovani Gallardo (shoulder tendinitis) allowed three runs and six hits in three innings for Class A Frederick vs. Potomac in his first rehabilitation assignment.
Red Sox: Jackie Bradley Jr., who has been on paternity leave, is expected to rejoin the Red Sox when they return home Friday to play Toronto.
Orioles: Chris Tillman (7-1, 2.92 ERA) seeks his seventh straight win Friday night against New York's Nathan Eovaldi.