ST. PETERSBURG, Fla. -- Boston needed a win, and Josh Beckett delivered.
The All-Star right-hander 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 Jason Varitek, David Ortiz and Mike Lowell to pull away to an 8-1 victory over the Tampa Bay Devil Rays on Friday night.
The victory snapped Boston's four-game losing streak and reduced the AL East-leading Red Sox's magic number to clinch at least a wild-card playoff berth to two.
"Twenty wins, it means a lot," Beckett said. "A lot of hard work from different people, and they picked me up on days when I was not 100 percent. It takes a lot of people to win that many games. I don't know if I can take credit for all of it."
Boston's skid, which included a three-game sweep at Toronto, matched its longest of the season and allowed the surging New York Yankees to pull within 1½ games in the division. But the win over Tampa Bay coupled with the Yankees' 5-4 loss to Toronto in 14 innings gave the Red Sox a 2½-game lead in the East.
Beckett (20-6) allowed one run and four hits, winning for the seventh time in his last eight decisions. He walked two, struck out eight and retired the last 10 batters he faced after yielding a two-out single to Delmon Young in the third inning.
"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 ... no doubt," Devil Rays manager Joe Maddon said. "They're definitely playing to go somewhere, and that matters."
Ortiz had a 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," Red Sox manager Terry Francona said. "Tonight, they made him work hard the first couple of innings. ... But he used all his pitches and didn't stray from his game plan, and probably got stronger as the game went."
The Red Sox staked Beckett to a 3-1 lead with plenty of help from the last-place Devil Rays, who allowed a run in the first inning on Dioner Navarro's throwing error and another in the third on Kazmir's wild pitch.
Ortiz, ending a stretch in which he was 1-for-15 with eight strikeouts, singled to drive in a second run in the third for Boston. The slugger reached on an infield single in the fifth, when the Red Sox loaded the bases and failed to score for the second time.
Kazmir, who allowed three runs and four hits in five innings, struck out Coco Crisp with the bases filled to keep the Red Sox from blowing the game open in the third. He walked Bobby Kielty to load the bases with one out in the fifth, then fanned Varitek and Crisp again to end the threat.
The Devil Rays starter, removed from the game because he was on a strict pitch count, walked four and also hit two batters. Kazmir struck out nine, and Tampa Bay pitchers fanned 17 overall to tie the franchise single-game record.
- Kazmir threw 91 pitches.
- Lowell's homer was his 20th. He's the first third baseman in Red Sox history to have consecutive 20-homer seasons.
- Boston LF Jacoby Ellsbury went 2-for-4 and has a hit in 17 of 18 games since being recalled from Triple-A Pawtucket on Sept. 1. He also made a highlight reel catch on Greg Norton's foul ball into the left field corner. He made the catch as he slid into a chair after stumbling over the mound in the Boston bullpen.
- Regular Red Sox LF Manny Ramirez (strained left oblique muscle) was out of the lineup for the 22nd consecutive game and is not expected to return during this series.
- Young has 179 hits, tops among all major league rookies. He's five shy of the Devil Rays' record for rookies set by Rocco Baldelli in 2003.