BOSTON — They had to win to avoid going home for the season, and the energized Red Sox relied on various resources to make sure Sunday was not the last game at Fenway Park this season.

From the bats of Hanley Ramirez (4-for-4, three RBIs) and Rafael Devers (homer, three RBIs) to the shutdown relief of David Price (four innings, four K’s) and the glove of Mookie Betts, the Sox answered in a big way to down the Astros, 10-3, in Game 3 of the American League Division Series presented by Doosan to avoid being swept in the first round for the second consecutive postseason.

It had been a tense game for most of the day, but the Boston bats broke it open with a six-run seventh inning that included a two-run double to the gap in left-center by Ramirez and a three-run homer by Jackie Bradley Jr. that was deflected into the stands by Astros right fielder Josh Reddick.

“We played with more of a sense of urgency,” said Betts. “I know we understand it’s kind of like a ‘do or die or go home’ situation. I think every game we should play with this sense of urgency.”

The Astros provided an early scare, riding a two-run shot by Carlos Correa in the top of the first to a 3-0 lead before the Red Sox even came to bat.

But unlike the first two games in Houston, Boston — backed by a loud home crowd — responded from the mound and at the plate.

“We got to [Red Sox starter Doug] Fister early, but then their bullpen came in, and Price was really good today,” said Correa, who has six RBIs in the series. “You’ve got to give credit to the guy when he pitched the way he pitched today. His cutter was very sharp, and he was working off that. He did his part. You have to tip the hat.”

The Red Sox will try to stave off elimination again in Monday’s Game 4, which will be played at 1:08 p.m. ET. The Astros are still in the driver’s seat: teams that have led 2-1 in the Division Series are 44-16 all-time.