It’s been a rough season in Boston, but when the Red Sox have succeeded, three players — Rafael Devers, Xander Bogaerts and Eduardo Rodriguez — often have led the charge.

Well, that trend continued Thursday afternoon at Fenway park.

The Red Sox earned a 5-4 win over the San Francisco Giants to avoid a three-game sweep. Devers (two RBIs) and Bogaerts (three RBIs) led the way on offense, while Rodriguez held San Francisco to one run on two hits over six innings to pick up his 18th win of the season.

Boston bats amassed nine hits on the afternoon, while the pitching staff held the Giants to only six hits. San Francisco starter Madison Bumgarner allowed five earned runs on nine hits over five innings.

The Giants entered the ninth inning facing a 5-3 deficit, but loaded the bases with no outs. However, despite issuing a bases-loaded walk with two outs, Brandon Workman escaped with his 15th save of the season.

With the win, the Red Sox improved to 80-72. The Giants dropped to 74-79 with the loss.

Here’s how it all went down:

GAME IN A WORD
Needed.

Listen, we all know where the Red Sox are in the standings. But that doesn’t mean being swept at home by a sub-.500 team suddenly is acceptable.

ON THE BUMP
— Rodriguez’s outing got off to a rough start as he allowed a leadoff single to Mauricio Dubon and an RBI sacrifice fly off the bat of Evan Longoria to begin the game.

The lefty settled in after that, however, finishing his outing allowing just two hits and two walks while striking out 10. Rodriguez now is 18-6 with a 3.53 ERA in 32 starts.

— Ryan Brasier pitched a perfect seventh inning with two strikeouts.

— Marcus Walden got the first two outs of the eighth inning but then allowed a walk, single and two-run double before being lifted from the game.

— Matt Barnes took over and promptly loaded the bases before striking out Stephen Vogt to end the inning.

— Brandon Workman loaded the bases with no outs in the ninth and walked in a run with two outs, but struck out Longoria to end the game and pick up the save.

IN THE BATTER’S BOX
— San Francisco’s 1-0 lead didn’t last long.

Andrew Benintendi led off the bottom of the first with a double and later was driven in on an RBI single from Devers. Bogaerts also drove in a run with an RBI single to center field.

— The Red Sox extended their lead the in next inning thanks to another RBI single from Devers and a two-run single by Bogaerts.

— The Red Sox loaded bases in the eighth but Devers fouled out to Buster Posey to end the threat.

— Devers (2-for-5) now is hitting .311 with 110 RBIs, while Bogaerts (2-for-4) is hitting .303 with 109 RBIs.

— Benintendi (2-for-4) was the only other member of the lineup with multiple hits. Christian Vazquez, Brock Holt and Chris Owings finished with a hit apiece.

— Gorkys Hernandez, Jackie Bradley Jr. and Marco Hernandez each went hitless.

TWEET OF THE GAME
Welcome back to the Twitterverse, Big Papi.

UP NEXT
The Red Sox will head to St. Petersburg where they’ll open a four-game series with the Tampa Bay Rays on Friday. First pitch from Tropicana Field is scheduled for 7:10 p.m. ET.

Thumbnail photo via Greg M. Cooper/USA TODAY Sports Images