Michael Dwyer, Associated Press
Boston's Kevin Youkilis, right, celebrates his home run as the Red Sox locked up a playoff berth.

BOSTON — Defending World Series champion Boston clinched a playoff berth Tuesday with a 5-4 victory over Cleveland.

Tim Wakefield outpitched Cliff Lee (22-3), and midseason acquisition Jason Bay hit the go-ahead single as Boston scored three times in the fifth to rally from a two-run deficit.

With the win, the Red Sox moved 6 1/2 games ahead of New York in the wild-card race with five games left. Boston still has a chance to catch Tampa Bay in the AL East.

Cleveland loaded the bases with two outs in the eighth before Jonathan Papelbon came on to get four outs and record his 41st save.

Wakefield (10-11) allowed four runs, six hits and a walk in six innings, striking out six. It's his 10th season in Boston with 10 or more wins, tying Roger Clemens for the most in franchise history.

Lee had won 11 straight decisions in 13 starts since picking up his second loss on July 6.

American League

RAYS 5-7, ORIOLES 2-5: At Baltimore, Tampa Bay reduced its magic number to win the AL East to two with a franchise first: a doubleheader sweep. After James Shields pitched seven effective innings in the opener, the Rays rallied to win the nightcap for the sweep, that combined with Boston's victory over Cleveland, left them three games ahead of the Red Sox in the AL East in pursuit of its first division title. In the second game, Tampa Bay trailed 5-1 before Evan Longoria homered and pinch-hitter Dioner Navarro singled in two runs off Jamie Walker (1-3) in a six-run eighth. The Rays had five hits through the first seven innings and six in the eighth.

YANKEES 3, BLUE JAYS 1: At Toronto, New York will miss the postseason for the first time since starting its run in 1995. Mike Mussina pitched five shutout innings to earn his 19th win and Jason Giambi homered for the Yankees, but it wasn't enough to keep New York's slim postseason hopes alive as Boston beat Cleveland minutes before the Yankees won. The Red Sox win clinched at least the AL wild-card and eliminated the Yankees from postseason contention.

ROYALS 5, TIGERS 0: At Detroit, Zack Greinke and Leo Nunez combined on a four-hitter to lift Kansas City. Mike Aviles, Ryan Shealy and Alex Gordon homered for Kansas City, which has won 10 of its last 12.

TWINS 9, WHITE SOX 3: At Minneapolis, Jason Kubel went 3-for-4 with two homers, including going back-to-back with Delmon Young in the seventh to put the game out of reach, and Minnesota moved within 1 1/2 games of Chicago in the AL Central.

RANGERS 6, ATHLETICS 4: At Arlington, Texas, Hank Blalock hit a go-ahead homer in the seventh and Texas snapped its five-game losing streak. Jamey Wright (8-7) allowed Cliff Pennington's RBI grounder that gave Oakland a 4-3 lead in the seventh.

MARINERS 9, ANGELS 6 At Seattle, Kenji Johjima drove in three runs to lead Seattle's comeback from a four-run deficit against the Angels.

National League

METS 6, CUBS 2: At New York, — Johan Santana sparked New York with an unusual broken-bat infield single and struck out 10 in eight innings, leading the Mets over Chicago. Jose Reyes had a three-run triple for his 200th hit of the season and David Wright drove in two runs for the Mets, who ended a three-game skid reminiscent of last season's epic collapse. New York, which entered with a one-game lead over Milwaukee in the wild-card race, moved within 1 1/2 games of NL East-leading Philadelphia, which lost 3-2 to Atlanta. The Phillies won the division title last year after the Mets blew a seven-game lead with 17 to play.

BRAVES 3, PHILLIES 2: At Philadelphia, Casey Kotchman homered and Mike Hampton won for the first time in a month for Atlanta. Philadelphia leads New York by 1 1/2 games in the NL East. Its magic number for clinching the division remained at four

NATIONALS 9, MARLINS 4: At Washington, Florida's playoff hopes officially ended at the hands of a team simply trying to avoid 100 losses. Alberto Gonzalez went 4-for-5 with two doubles and two RBIs, and Shairon Martis got his first major league win as Washington broke a five-game losing streak.

BREWERS 7, PIRATES 5: At Milwaukee, Prince Fielder homered with two outs in the bottom of the ninth and Milwaukee kept pace with New York in the NL wild-card race. Fielder homered off reliever T.J. Beam (2-2) to keep Milwaukee one game behind the Mets with five to go. It was Milwaukee's 10th game-ending hit this season and its 10th straight win over Pittsburgh this year.

CARDINALS 7, DIAMONDBACKS 4: At St. Louis, Kyle Lohse won his 15th game and St. Louis clobbered Randy Johnson for the second time this month. Ryan Ludwick hit a three-run homer in the first and Albert Pujols had two hits, two RBIs and reached 100 walks for the first time in his career for the Cardinals, who won for the third time in 13 games.

REDS 2, ASTROS 1: At Houston, Edinson Volquez pitched 7 1/3 strong innings and Cincinnati scored two unearned runs to push Houston to the brink of playoff elimination. With the Mets' win over Chicago, Houston fell 4 1/2 games behind New York with five games to go. A loss and a Mets win Wednesday would eliminate the Astros from the playoffs.

DODGERS 10, PADRES 1: At Los Angeles, Nomar Garciaparra and Blake DeWitt each hit three-run homers and Los Angeles reduced their magic number for clinching the NL West title to three. Manny Ramirez added a two-run double, making him the second player in major league history to record at least 50 RBIs in each league during the same season.

ROCKIES 9, GIANTS 4: At San Francisco, Tim Lincecum held on to the NL ERA lead but slipped in the Cy Young race as the Colorado Rockies rallied to beat the Giants' young ace Tuesday night.