BOSTON (AP) — Anthony Santander hit a tiebreaking single in the ninth inning and also had a two-run homer, helping the Baltimore Orioles overcome a pair of six-run deficits to beat the Boston Red Sox 12-8 Friday night.

Baltimore trailed 8-2 before Jorge Mateo hit a three-run homer in the seventh inning and Austin Hays added a two-run shot in the eighth. The Orioles also capitalized on a throwing error by third baseman Rafael Devers for the tying run in the eighth.

Santander’s single against Matt Strahm (2-2) dropped just in front of sliding right fielder Jackie Bradley Jr., allowing Cedric Mullins to score. Mullins led off the inning with a single, then took third on Trey Mancini's single with a slick slide around Devers' attempted tag.

The Orioles piled on three more runs in the ninth, and Jorge Lopez didn't allow a runner in the bottom half. Baltimore's bullpen limited Boston to one hit after the fifth inning.

Boston fans booed as the Orioles celebrated. Baltimore outhit the Red Sox 15-14 to open the five-game series.

Santander also hit a two-run homer in the fourth, Baltimore’s first hit of the night after Boston raced to a 6-0 lead against starter Kyle Bradish. Santander’s eighth homer of the season accounted for the only runs allowed by Garrett Whitlock, who delivered six strong innings before Boston’s bullpen unraveled.

Cionel Perez (3-0) got the win with one pitch, a popup by Christian Arroyo that ended the eighth inning.

Xander Bogaerts hit a three-run homer during a four-run first inning for Boston, and the Red Sox scored two more in the second. Whitlock was solid through six innings but replaced in the seventh by Jake Diekmen, who allowed a single and walked a batter before Mateo’s homer to left pulled Baltimore within 8-5.

John Schreiber came out of the bullpen for the eighth and didn’t fare much better. Hays’ two-run homer bounced off a billboard above the Green Monster seats and pulled Baltimore within a run. A throwing error by Devers on Ramón Urías’ infield single allowed the tying run to cross.

Trevor Story, who entered Friday with seven homers and 21 RBIs in his previous seven games, was the only Boston batter without a hit Friday. Story did reach base in the eighth when reliever Dillon Tate hit him in the helmet as he tried to duck out of the way. J.D. Martinez and Bogaerts were also plunked by high fastballs, but neither appeared injured.

WELCOME BACK PAPI

Former Red Sox slugger David Ortiz was back at Fenway Park for his first of two Hall of Fame inductions this summer. Ortiz headlined the Red Sox Hall of Fame class of 2020 in a ceremony that was delayed two years by the pandemic.

Ortiz will be enshrined in the Baseball Hall of Fame in July. He was joined in the 2020 Red Sox class by former Boston catcher Rich Gedman, former general manager Dan Duquette, the late Bill Dinneen and Manny Ramirez, who was not at the ceremony.

TRAINER’S ROOM

Orioles: IF prospect Jahmai Jones had Tommy John surgery Friday, a procedure that ended this season for Jones and possibly a chunk of 2023, manager Brandon Hyde said. Jones was batting .212 with two homers for Triple-A Norfolk before going on the IL earlier this month with inflammation in his right elbow.

Red Sox: LHP Chris Sale (rib stress fracture) threw three bullpen sessions this week and could throw a simulated game or batting practice as early as next week, manager Alex Cora said. Cora said Sale could possibly start a minor-league rehab assignment in early June.

UP NEXT

RHP Nathan Eovaldi (1-2, 4.10 ERA) is scheduled to start the opener for the Red Sox in a doubleheader Saturday. Hyde said he would likely go with RHP Jordan Lyles (3-4, 4.10) in the opener and come up with a spot starter to throw the first few innings in the nightcap. Boston planned to call-up RHP Josh Winckowski to start the evening game in his major league debut.

___

More AP MLB: https://apnews.com/hub/MLB and https://twitter.com/AP_Sports