BOSTON — Fans chanted Tim Wakefield’s name. A teammate sprayed him with champagne. It was about time.

Baseball’s oldest player earned his elusive 200th victory and the Boston Red Sox slugged their way to their first win in a week, 18-6 over the Toronto Blue Jays thanks to an 18-hit outburst.

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 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 RBI, 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.”