The 45-year-old knuckleballer was winless in his previous seven outings. His team's playoff prospects dimmed with losses in its last five games. But on Tuesday night, Boston set a season high for runs and moved four games ahead of Tampa Bay, a 4-2 loser to Baltimore, in the AL wild-card race.

"There was some genuine happiness, probably for us, too," manager Terry Francona said. "It seemed like we'd been waiting for that win as long as Wake's been waiting for his."

The Red Sox needed the victory badly after their lead over the Rays had dropped from nine games to three over the previous nine days. And Wakefield was eager to end the long wait -- 0-3 in seven outings since his last win on July 24 -- to become the 108th pitcher with 200 wins.

"I'm kind of speechless," said Wakefield, who signed with Boston in 1995 after being released by Pittsburgh, "but I'm very grateful that I've been able to wear this uniform for as long as I have and reached a milestone that I thought I'd never reach."

Dustin Pedroia hit two homers and he and Jacoby Ellsbury had four hits each. But the Red Sox still feel pressure with a four-game home series against Tampa Bay starting Thursday night.

"Not really," Pedroia said when asked if the win took a weight off the team. "We've got 15 games left and were up, what, four now? ... We're all taking it like it's the playoffs now."

Wakefield (7-6) went six innings and overcame a shaky outing to retire his last six batters. He left with a 6-5 lead after allowing six hits and two walks. He struck out two.

The crowd clapped and chanted, "Wakefield! Wakefield!" as Junichi Tazawa pitched the ninth for Boston.

After the game, Wakefield went on the field and closer Jonathan Papelbon sprayed him with champagne. Wakefield waved and winked to the crowd and then hugged his teammates. The song "Still the One" played on the sound system.

"Two hundred wins is a long time," said Toronto manager John Farrell, Wakefield's pitching coach from 2007-10. "It's a heck of an accomplishment. We would have liked to prolong that date that he got his 200th a little bit more."

The Red Sox added to their cushion with four runs in the sixth on a double by Carl Crawford, an RBI single by Jarrod Saltalamacchia, a single by Ellsbury and a three-run homer by Pedroia, his 20th of the year. Pedroia, who tied his career high with five RBIs, also was on the tail end of consecutive homers with Ellsbury in the fourth.

Pedroia went 4 for 5 with two homers, two doubles and a sacrifice fly after going just 3 for 31 on the road trip that ended Sunday with Boston losing six of seven games. Ellsbury also had four hits and Crawford had three.

"I had a clean inning there in the sixth," Wakefield said, "then our offense exploded and made it easier to watch from inside, that's for sure."

But during his winless streak, he thought he might never reach 200 wins.

"It did cross my mind," he said, "but I kept telling myself that milestone doesn't determine me as a person. (I've) been very fortunate to live out a dream I had as a kid and I'm just thankful that it happened tonight and I'm very grateful that it happened in front of our home crowd."

Brandon Morrow (9-11) left after Crawford led off the sixth with a double and took third on Marco Scutaro's sacrifice. Luis Perez allowed hits to the only four batters he faced, starting with Saltalamacchia's single that made it 7-5.

Alfredo Aceves relieved Wakefield in the seventh and worked two scoreless innings. Tazawa, just recalled from the minors, finished up.

Boston took a 2-0 lead on unearned runs in the first when Pedroia doubled, Adrian Gonzalez walked, Kevin Youkilis was hit by a pitch and Josh Reddick was safe on a two-base throwing error by first baseman David Cooper.

Toronto went ahead 3-2 in the second on J.P. Arencibia's 23rd homer, a three-run shot. But the Red Sox made it 4-3 in the bottom of the inning on an RBI double by Ellsbury and Pedroia's sacrifice fly.

Wakefield gave the runs right back in the third when the Blue Jays took a 5-4 lead as Eric Thames led off with a single and Jose Bautista hit his major league-high 42nd homer.

Then the Red Sox went ahead to stay 6-5 on the back-to-back homers by Ellsbury, his 27th, and Pedroia.

"When you don't make pitches, we saw tonight what they're capable of," Farrell said. "Pedroia breaks out of a long slump for him with a big night. Ellsbury's been on fire all year."

Wakefield's previous start also was against the Blue Jays and he left that with an 8-5 lead last Wednesday. But the bullpen failed and Toronto came back for an 11-10 win, forcing Wakefield to keep waiting for that elusive 200th win.

But on Tuesday, the Red Sox kept adding to their lead with four runs in the sixth, one in the seventh and seven in the eighth. Saltalamacchia's three-run double highlighted Boston's final inning at the plate.

Game notes

Boston DH David Ortiz was in the starting lineup but experienced muscle spasms in his back and Jed Lowrie pinch-hit for him in the first. ... Morrow is 0-4 in his last four starts and 1-6 in his last eight. ... Scutaro's double in the eighth was his 1,000th career hit. ... John Lackey (12-12) pitches for Boston against Ricky Romero (14-10) in Wednesday afternoon's finale of the two-game series. ... Wakefield's ERA increased from 5.03 to 5.13. ... Toronto shortstop Yunel Escobar will miss at least the two games in Boston because of a bruised left arm. ... With 20 homers and 25 stolen bases, Pedroia became the seventh Red Sox player with 20 homers and 20 steals. Ellsbury has 27 homers and 36 steals. Jackie Jensen is the only player in club history to have two 20-20 seasons.