BOSTON — The Boston Red Sox’s turnaround season just keeps getting better.

Boston moved one step away from the World Series on Tuesday night by beating the Tampa Bay Rays 3-1 at Tropicana Field to win the best-of-five American League Division Series in four games.

A year ago, the Red Sox finished last in the AL East with a 69-93 record. This year, they won the division with a 97-65 mark — tying the St. Louis Cardinals for the best regular-season record in the major leagues — and are now headed to the American League Championship Series to face either the Oakland Athletics or Detroit Tigers.

The ALCS will open Saturday at Fenway Park in Boston. The Athletics and Tigers meet Thursday night at Oakland in the decisive Game 5 of their ALDS.

The Red Sox are in the ALCS for the first time since 2008, when they lost in seven games to the Rays. However, this time they dispatched Tampa Bay, their AL East rival.

“It’s great, but we’ve still got one more to get where we want to be,” Red Sox outfielder Shane Victorino said. “We’ll get a few days off to rest and see what happens in the other division series, and we’ll go from there.”

The Red Sox rallied late Tuesday to put away the Rays. They scored twice in the seventh inning on a wild pitch by Joel Peralta and an RBI infield single by Victorino to move in front 2-1, then added an insurance run in the ninth on Dustin Pedroia’s sacrifice fly.

“They didn’t make any mistakes,” Rays manager Joe Maddon said of the Red Sox. “You could see their grit. They’ve got a lot of gamers over there.”

The Red Sox split six games with the Athletics in the regular season and went 3-4 against the Tigers.

Craig Breslow earned the win in the series-clinching win for the Red Sox. Breslow struck out four, including the side in the seventh just after the Red Sox scored twice for a 2-1 lead.

“He’s been, I don’t want to say an unsung hero, but he’s flown under the radar most of the year,” manager John Farrell said. “When he comes out and gets the strikeout of [James] Loney, and he goes through the next inning with the three strikeouts, a huge performance on his part to bridge to both Junichi [Tazawa] and Koji [Uehara] as we finish that out.”

Uehara earned a four-out save Tuesday after allowing the game-winning homer to Jose Lobaton with two outs in the bottom of the ninth Monday. He bounced back to retire all four batters he faced in Game 4, striking out two.

Victorino was hit by a pitch four times in the four games against Tampa Bay, setting a record for an AL Division Series. He broke an 0-for-7 slide against Peralta with a broken-bat single to knock in the eventual winning run in the eighth of a 3-1 win that sealed the series Tuesday. Victorino went 6-for-14 (.429) with three RBIs in the ALDS.

Jacoby Ellsbury set an all-time Red Sox playoff record with his ninth stolen base Tuesday. He scored the go-ahead run after stealing second and advancing to third on a wild pitch, then coming home on a Victorino single. Ellsbury stole one base in each of the four games in the AL Division Series.

Xander Bogaerts became the second-youngest player (21 years, seven days) to draw multiple walks in a postseason game Tuesday. The only one younger was Mickey Mantle (19 years, 349 days). Bogaerts, entering as a pinch hitter in the seventh, drew a rally-starting walk off Jake McGee, then scored the tying run on a wild pitch. He walked and scored again in the ninth.

QUOTE TO NOTE: “I knew it was going to be a tough at-bat with [Joel] Peralta in the game. I haven’t had much success against him. I was telling myself, ‘Hey, put this ball in play whatever way you can. Just try to make something happen.’ I came out on the good end, with a broken-bat infield hit. I was able to beat it out. That’s the kind of things you look back on and talk about executing and doing the little things and doing whatever it takes to win.” — Victorino on his go-ahead, infield single in the seventh inning Tuesday.