BOSTON (AP) -- Victor Martinez had never been around for one of David Ortiz 's trademark game-ending homers, and he thought it would be a good time to see his first.
''Victor, man, he just pushed me for every at-bat,'' Ortiz said after curling his second homer of the game around the Pesky Pole to break a ninth-inning tie and give the Boston Red Sox a 3-2 victory over the Chicago White Sox on Wednesday night. ''He got in my face and started screaming at me. I liked it. It got me in the mood.''
It was Ortiz's 10th career game-ending homer and his ninth with the Red Sox , breaking a franchise record that had been held by Hall of Famer Jimmie Foxx . But it was the first for Ortiz since Sept. 12, 2007, and his first multihomer game of the season.
And it couldn't have come at a better time for the Red Sox , who remained six games behind the New York Yankees in the AL East but improved to 2 1/2 games in front of Texas in the wild-card race.
''You're getting late into August right now, and it's good to have big hits like that, especially from him,'' said All-Star Tim Wakefield , who pitched seven strong innings in his return from the disabled list. ''We were able to scrap together enough runs to get a win and hopefully we can carry that momentum into tomorrow and sweep this series.''
Wakefield allowed six hits and left after seven innings with a 2-1 lead, but the 43-year-old knuckleballer was deprived of a win when Jayson Nix homered off reliever Ramon Ramirez to make it 2-2 in the eighth. Daniel Bard (1-1) inherited the eighth-inning jam, pitching out of it and then adding a perfect ninth for his first career victory.
Tony Pena (1-2) struck out Kevin Youkilis to start the ninth before Ortiz, who hit a solo homer in the second, lined a 1-0 pitch down the right-field line, stopping to clap his hands once and then circling the bases before being greeted at home plate by his teammates.
Alex Gonzalez also homered for Boston, which beat Chicago for the third straight time and dropped the White Sox (63-64) below .500 for the first time since June 28.
''The way we're playing, it feels like we're playing 20 games out,'' White Sox manager Ozzie Guillen said. ''But I think this ballclub is better than what it shows right now.''
The Red Sox opened the game with a tribute to U.S. Sen. Edward Kennedy, honoring a lifelong fan whose family was as much a part of Boston history as the team itself. Kennedy, who died Tuesday night after a long bout with brain cancer, threw out the ceremonial first pitch on opening day 97 years after his grandfather, Boston mayor John ''Honey Fitz'' Fitzgerald christened the ballpark that is now the oldest in the major leagues.
A lone Air Force bugler played ''Taps'' as both teams lined up on the baselines - a tradition usually reserved for playoff games or opening day.
The somber beginning and the raucous ending provided emotional bookends to a game that also featured Wakefield's return after his first All-Star game selection. He hadn't pitched since July 8 because of a lower back injury.
Wakefield was activated from the disabled list before the game, and the first sign his knuckleball was active was when his first pitch squirted away from Martinez, who was acquired at the trading deadline while Wakefield was on the DL. He used his first baseman's mitt to catch.
''For the first time catching me in a game situation with hitters up there, he did a phenomenal job,'' Wakefield said.
He gave up his only run in the first when Gordon Beckham reached on an end-of-the-bat single and Paul Konerko tripled. Wakefield allowed just one ball out of the infield until A.J. Pierzynski doubled off the Green Monster with two outs in the sixth.
Gavin Floyd nearly matched Wakefield, but he allowed two solo homers among his five hits, walking one and striking out four in six innings. He put runners on first and second with one out in the sixth, but he got Youkilis on a fly ball to center and struck out Ortiz to keep it a one-run game.
Chicago put runners on first and second in the seventh, but Alexei Ramirez popped out to shortstop and Wakefield left with a 2-1 lead and to a big ovation from the crowd - and handshakes in the dugout.
Nix tied it in the eighth, and Chicago had a runner on third when Bard relieved Ramirez and struck out Jim Thome with a 101 mph fastball to end the inning.
NOTES: RHP Enrique Gonzalez was designated for assignment to make room for Wakefield. ... Ortiz has the seventh-most homers against the White Sox among active players, tied with Troy Glaus with 21. ... Red Sox and White Sox Hall of Famer Carlton Fisk was in the Boston clubhouse before the game. Asked who he was rooting for, he said, "the Sox."