And the New York Yankees did their part for Boston, too.
Beckett pitched six strong innings to become the first 20-game winner in the majors since 2005, and the Red Sox used late home runs by Varitek, Ortiz and Lowell to pull away to an 8-1 victory over the Tampa Bay Devil Rays on Friday night.
Coupled with the Yankees' 5-4 loss to Toronto in 14 innings, the Red Sox increased their AL East lead to 2 1/2 games and reduced their magic number to clinch at least a wild-card playoff berth to two.
"We had a little talk before the game," Ortiz said. "We said just start having fun like we've been doing, and we want to play the game and forget about the division thing for a night. We wanted to walk away from that and just focus on winning the game."
That was made a bit easier by putting Beckett (20-6) on the mound. He won for the seventh time in his last eight decisions, yielding one run while striking out eight and helping Boston snap a four-game losing streak that had allowed the Yankees to climb back into contention.
"Twenty wins, it means a lot," Beckett said. "It takes a lot of people to win that many games. I don't know if I can take credit for all of it."
Relievers Manny Delcarmen, Javier Lopez and Eric Gagne pitched three perfect innings to finish the victory.
"When you're playing this time of year, and you're playing against teams that have a chance to go to the dance, there's a different feeling," Devil Rays manager Joe Maddon said. "They're definitely playing to go somewhere, and that matters."
In other AL games, it was Seattle 6, the Los Angeles Angels 0; Cleveland 4, Oakland 3; Detroit 5, Kansas City 4; Texas 3, Baltimore 2; and the Chicago White Sox 6, Minnesota 4.
Ortiz had an RBI single off Scott Kazmir (13-9) in the third and added a three-run homer off Jeff Ridgway in the ninth. Varitek hit a solo homer off Gary Glover in the eighth and Lowell followed Ortiz's 32nd homer with a solo shot off Grant Balfour in the ninth.
Beckett improved to 11-2 on the road and is the Red Sox's first 20-game winner since Curt Schilling won 21 in 2004. He's the first in the majors to do it since 2005, when Dontrelle Willis, Chris Carpenter, Bartolo Colon and Roy Oswalt all reached the plateau.
"To win 20, he's been on a pretty good roll all year," Boston manager Terry Francona said.
The Yankees had finally been getting on a roll late in the season, but strong pitching by Roy Halladay and timely hitting allowed the Blue Jays to squelch a comeback bid.
Gregg Zaun's homer in the 14th inning off Brian Bruney (3-2) came after the Yankees, handcuffed into the ninth by Halladay, scored four times to tie it.
"I was proud of how we bounced back," said Yankees manager Joe Torre, whose club had won four in a row and 12 of 14. "It's just disappointing how it ended."
Joe Kennedy (4-9) escaped a 13th-inning jam and got two outs in the 14th. Jason Frasor struck out pinch-hitter Wilson Betemit for his third save.
Halladay outpitched Chien-Ming Wang, allowing four runs - one earned - and eight hits while striking out four. He walked none and threw 82 of his 110 pitches for strikes.
"That's about as dominant as I've seen him. He was having an easy time with us," Torre said.