BOSTON — When Shane Victorino signed with the Boston Red Sox as a free agent in the offseason, they were coming off a last-place finish that was their worst in almost half a century. They had fired their manager for the second year in a row.

He believed they could turn it around.

And quickly.

Victorino brought the Red Sox one big step closer to completing their comeback, sending them to the World Series with a seventh-inning grand slam that gave Boston a 5-2 victory over the Detroit Tigers in Game 6 of the AL Championship Series on Saturday night.

Save 75% on a Digital Subscription Today

The Red Sox will open the Series on Wednesday night against the St. Louis Cardinals, the team they swept in 2004 to end their 86-year title drought. The Cardinals won the NL pennant on Friday night by eliminating the Los Angeles Dodgers in six games.

“It’s one of those moments you live for,” Victorino said as he wandered around the Fenway Park infield while Red Sox fans serenaded him with his theme song, Bob Marley’s “Three Little Birds,” and its chorus, “Don’t worry about a thing, ’Cause every little thing is gonna be all right.”

“Just listen to the crowd,” Victorino said, referring then to the Boston Marathon bombings that left the city reeling during the first month of his first season in town. “The one thing I came here to do is to be a part of this city. With all we went through as a city, there’s definitely a bond.”

Detroit took a 2-1 lead in the sixth and 21-game winner Max Scherzer protected it until the seventh, when Boston loaded the bases on a double, a walk and an error by rookie shortstop Jose Iglesias. Victorino fell behind Jose Veras 0-2 but lofted a hanging curveball over the Green Monster to set off a celebration in the Red Sox dugout and in the Fenway Park stands.

“It’s been a special ride,” second baseman Dustin Pedroia said, “and we’re still going.”

Junichi Tazawa got one out for the win, Craig Breslow pitched a scoreless eighth and series MVP Koji Uehara got the last three outs before the Red Sox poured out of the dugout to begin their now-familiar celebration on the mound.

“The way I would sum it up is that I thought their starters were good,” Tigers manager Jim Leyland said. “I thought their bullpen was great.”

Uehara, who inherited the closer job after the team’s first two choices were injured, posted three saves and a win in the series. Then he joked about pitching so well under pressure.

“To tell you the truth, I almost threw up,” Uehara kidded through a translator.

It’s the 13th AL pennant for the Red Sox and their first since 2007, when they swept the Colorado Rockies to win it all for the second time in four seasons. Boston swept the Cardinals in ’04, winning Game 4 in St. Louis to clinch the title that put an end to generations of disappointment.

The latest trip comes one year after a 69-win season that prompted the team to jettison its high-priced stars, rebuild the roster and bring in manager John Farrell. Victorino was one of the biggest additions, and he delivered Saturday as he did all season.

“Since the first day of spring training there wasn’t one person more important than the next,” said outfielder Jonny Gomes, also a newcomer this season. “We’re all pulling in the same direction.”

Scherzer and Clay Buchholz also matched up in Game 2, when the Tigers right-hander took a no-hitter and a 5-0 lead into the sixth. The Red Sox rallied against the Detroit bullpen, tying it on David Ortiz’s eighth-inning grand slam and winning it in the ninth on Jarrod Saltalamacchia’s walkoff single.