Mookie Betts’ two-out grounder hit the third base bag and popped into the outfield for a tiebreaking, two-run double in the ninth inning, and the Boston Red Sox broke a four-game losing streak by beating the Oakland Athletics 6-3 on Wednesday night.

After starting off 1-5, the World Series champion Red Sox caught a break and ended Oakland’s four-game winning string.

With two outs in the ninth and the score 3-all, Blake Swihart and Jackie Bradley Jr. both singled and advanced on a wild pitch by Fernando Rodney (0-1). Betts then hit a grounder down the line and, with Gold Glove third baseman Matt Chapman in position to make a backhanded play, the ball struck the base, bounced high in the air and landed in the outfield grass.

Boston Red Sox's Blake Swihart, left, celebrates with Jackie Bradley Jr. after both scored against the Oakland Athletics during the ninth inning of a baseball game in Oakland, Calif. (AP Photo/Jeff Chiu)
Boston Red Sox’s Blake Swihart, left, celebrates with Jackie Bradley Jr. after both scored against the Oakland Athletics during the ninth inning of a baseball game in Oakland, Calif. (AP Photo/Jeff Chiu)

Betts wound up on second, and the AL MVP scored on a triple by Andrew Benintendi.

Swihart finished with three hits, including his first home run of the season. Mitch Moreland had a key two-run double while J.D. Martinez singled to extend his hitting streak to seven games.

Boston avoided its longest losing streak since 2015 after being shut out in the previous two games. Holt helped preserve the 3-all tie in the eighth with a sharp play on a grounder in the hole.

Oakland Athletics pitcher Fernando Rodney walks toward the dugout after being removed during the ninth inning of the team's baseball game against the Boston Red Sox in Oakland, Calif. (AP Photo/Jeff Chiu)
Oakland Athletics pitcher Fernando Rodney walks toward the dugout after being removed during the ninth inning of the team’s baseball game against the Boston Red Sox in Oakland, Calif. (AP Photo/Jeff Chiu)

Matt Barnes (1-0) retired four batters. Ryan Brasier pitched the ninth for his first save.

Ramon Laureano homered for the A’s.

The Red Sox fell behind 3-0 before rallying.

Boston Red Sox's Mitch Moreland (18) celebrates with Mookie Betts after the Red Sox defeated the Oakland Athletics in a baseball game in Oakland, Calif. (AP Photo/Jeff Chiu)
Boston Red Sox’s Mitch Moreland (18) celebrates with Mookie Betts after the Red Sox defeated the Oakland Athletics in a baseball game in Oakland, Calif. (AP Photo/Jeff Chiu)

Oakland scored its first run on a bizarre play when Nick Hundley hit a sharp, one-out liner that knocked the glove off Red Sox third baseman Rafael Devers’ left hand. As his mitt lay on the dirt, Devers fielded the ball barehanded and made a one-hop throw home to Swihart, but the catcher couldn’t hang on as Kendrys Morales slid in safely.

ARE THEY AIMING AT HIM?

Umpire Kerwin Danley has had a rough series, literally. While manning second base, Danley was hit by a throw from the outfield by Bradley following a single by Jurickson Profar in the second inning. On Tuesday, Danley was at third when he was hit by a line drive by Oakland’s Stephen Piscotty, one day after being hit by foul ball while working behind the plate.

Boston Red Sox's Andrew Benintendi watches an RBI triple against the Oakland Athletics during the ninth inning of a baseball game in Oakland, Calif. (AP Photo/Jeff Chiu)
Boston Red Sox’s Andrew Benintendi watches an RBI triple against the Oakland Athletics during the ninth inning of a baseball game in Oakland, Calif. (AP Photo/Jeff Chiu)

TRAINER’S ROOM

Red Sox: 1B/OF Steve Pearce has rejoined the team and is likely to be activated off the injured list before Thursday’s game. Last year’s World Series MVP has been out since March 25 with a left calf strain. . SS Xander Bogaerts was held out of the lineup a day after fouling a ball off his foot, although manager Alex Cora said Bogaerts was due for a planned day off regardless.

Athletics: Chapman was hit on his left wrist by a slider from Boston starter Nathan Eovaldi in the first inning but stayed in the game.

Boston Red Sox's J.D. Martinez, center, argues with umpire Tripp Gibson, left, after striking out during the eighth inning against the Oakland Athletics in a baseball game in Oakland, Calif. (AP Photo/Jeff Chiu)
Boston Red Sox’s J.D. Martinez, center, argues with umpire Tripp Gibson, left, after striking out during the eighth inning against the Oakland Athletics in a baseball game in Oakland, Calif. (AP Photo/Jeff Chiu)

UP NEXT

Oakland’s Brett Anderson (1-0, 0.00) takes a 34 1/3-inning scoreless streak at the Coliseum into Thursday’s series finale and will oppose Boston’s Eduardo Rodriguez (0-1, 10.38) in a matchup of lefties. Rodriguez has allowed three earned runs or fewer in four career starts against the A’s.

__

Boston Red Sox pitcher Nathan Eovaldi, right, reacts next to catcher Blake Swihart after walking Oakland Athletics' Marcus Semien to load the bases during the second inning of a baseball game in Oakland, Calif. (AP Photo/Jeff Chiu)
Boston Red Sox pitcher Nathan Eovaldi, right, reacts next to catcher Blake Swihart after walking Oakland Athletics’ Marcus Semien to load the bases during the second inning of a baseball game in Oakland, Calif. (AP Photo/Jeff Chiu)

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

Oakland Athletics' Kendrys Morales, left, scores a run past Boston Red Sox catcher Blake Swihart during the second inning of a baseball game in Oakland, Calif. (AP Photo/Jeff Chiu)
Oakland Athletics’ Kendrys Morales, left, scores a run past Boston Red Sox catcher Blake Swihart during the second inning of a baseball game in Oakland, Calif. (AP Photo/Jeff Chiu)