Red Sox closer Andrew Bailey pumps his fist after striking out Oakland’s Jed Lowrie to end the game at Fenway Park in Boston Wednesday.

BOSTON — Stephen Drew hit a two-run triple, David Ortiz had two hits and drove in a run and the Boston Red Sox beat the Oakland Athletics 6-5 on Wednesday afternoon to take a three-game series.

It was Boston’s ninth win in 12 games and came after a 13-0 loss to Oakland a night earlier.

Chris Young had a three-run homer and a solo shot for the Athletics, who finished a six-game road trip 1-5. They were swept at the Tampa Bay Rays over the weekend.

Ortiz is 8 for 16 since returning to the lineup on Saturday for the first time since last August. He missed 71 of the final 72 games last season and all of spring training’s with an Achilles tendon injury.

Jon Lester (4-0) got the win despite walking a season-high six and lasting just 5 2-3 innings. He allowed three runs on six hits, striking out five and walking two more than he had in his previous four starts.

Andrew Bailey struck out all three batters in the ninth for his fifth save.

It was Lester’s 89th career win, matching Babe Ruth for fifth in club history for left-handers.

Brett Anderson (1-4) was hit hard for the third straight start, giving up six runs on eight hits in four-plus innings. In the last three, he’s been tagged for 17 runs in 10 2-3 innings.

The Red Sox broke a 3-all tie and chased Anderson with a three-run fifth. Jacoby Ellsbury opened the inning with an infield hit and scored on Shane Victorino’s double. Dustin Pedroia reached on an infield hit and Ortiz followed with an RBI single. Chris Resop relieved and hit Mike Napoli with the first pitch before Daniel Nava had a pinch-hit single. After Will Middlebrooks flied out, Jerry Blevins entered and retired the final two batters, leaving the bases loaded.

Lester was pulled with the bases loaded and in the sixth, but Junichi Tazawa got Coco Crisp to fly out.

Josh Donaldson’s RBI single made it 6-4 and Young’s second homer cut it to one in the eighth.

The Athletics had jumped ahead with three runs against Lester in the fourth on Young’s homer that caromed off a billboard above the Green Monster seats, but Boston tied it with three in the bottom of the inning.

Ortiz, back in the lineup after getting Tuesday off, doubled leading off and scored on Napoli’s double. Jonny Gomes walked and, one out later, Drew tripled into the right-field corner.

NOTES: Anderson had left his previous start with a sprained right ankle. ... Oakland manager Bob Melvin said he kept Josh Reddick out of the starting lineup with a tough lefty going now that it looks like the outfielder’s worked out of a slump. Reddick was 2 for 4 in each of the first two games after going just 3 for 37 in the previous 10. Reddick struck out pinch hitting. ... Boston recalled RHP Daniel Bard from Double-A Portland before the game and optioned RHP Steven Wright to Triple-A Pawtucket. ... The Red Sox again honored members of the Watertown, Mass., police department. Members stood on top of both dugouts, got a big ovation from fans and both teams. ... Home plate umpire Jerry Layne left the game after being hit on the left hand by a foul tip in the third. Second base ump Mike Estabrook took over behind the plate. ... Anderson was 5-2 with a 2.70 ERA in eight starts against Boston. ... A fan was taken from the stands on a stretcher in the ninth.