BOSTON (AP) -- Jason Varitek finally delivered a big hit. So did a few of his teammates.
Varitek began working his way out of a long slump and the Boston Red Sox emerged from a short one, beating the Arizona Diamondbacks 5-4 Tuesday night with a four-run eighth inning capped by the captain's go-ahead single.
"I had some feeble at-bats over a few weeks and I had some really good ones," said Varitek, who was 1-for-30 before his decisive hit.
He's also had some tough breaks, hitting the ball hard for outs. With runners at first and second and two outs in the first, he lined a ball up the middle that hit pitcher Doug Davis and ricocheted to shortstop Stephen Drew, who threw out Varitek at first.
"Tek's been a little bit unlucky," said Mike Lowell, whose two-run double tied the game at 4. "He's hit better than just those numbers, but it always feels good for a ball to drop, especially in a big situation."
They were dropping all over the place in the eighth. Boston had six hits in the inning, one more than it totaled in the first seven and two more than the Red Sox managed in Monday night's 2-1 loss in the series opener. The win maintained their one-game lead in the AL East over Tampa Bay, which beat Florida 6-4.
"Any comeback win is big," Lowell said, "especially when I saw Tampa Bay won and we can stay atop our division."
Smith made his debut Saturday after beginning his career in the Boston organization in 2002.
"At some point you just don't think about it and then the next thing you know you're up here and you're racing 100 mph," he said.
Arizona led 4-1 going into the bottom of the eighth behind the pitching of Davis and the hitting of Chad Tracy, who singled home a run in the second and hit a three-run homer, his third of the season, in the third.
"We had a good feeling going into that inning," Diamondbacks manager Bob Melvin said. "A couple of guys get on and it unraveled on us."
Dustin Pedroia's seventh homer in the first was the only run off Davis through seven innings.
But the left-hander allowed singles to the first two batters in the eighth, Julio Lugo and Jacoby Ellsbury, and was replaced by Chad Qualls (1-6). Pedroia singled in Lugo, but Qualls nearly got out of the jam by striking out J.D. Drew and retiring Manny Ramirez, who has one RBI in 11 games, on a grounder to third.
Then, with runners at second and third, Lowell lined a 2-0 pitch over the head of left fielder Eric Byrnes. Ellsbury and Pedroia scored easily.
"It was supposed to be down and away," Qualls said. "It was down the middle and he hit it off the wall."
The switch-hitting Varitek, batting lefty against the right-handed Qualls, then singled for his first RBI in nine games and his second hit in two nights after going 0-for-24.
"When he's not swinging, you'd never know it by his demeanor," Boston manager Terry Francona said. "As long as we win, he's the same. But that was a big hit."
And one of several big mistakes by Qualls.
"It's inexcusable," he said. "I take full blame. It was like I was trying too hard to not make mistakes. When I made mistakes they hit it."
Davis was solid through seven innings. After allowing three hits in the first, he faced just two batters over the minimum in the next six innings, giving up two hits and one walk and striking out five.
"It seems like it happened real fast and we just got some runs there at the right time," Pedroia said.
Masterson, who started the season in Double-A, allowed four runs for the second time in his seven starts and put runners on base in each of his six innings but the first.
The start was delayed 36 minutes by rain. It was Boston's third straight game and fourth of the last five that were delayed at the start by rain. ... Brothers J.D. and Stephen Drew are a combined 0-for-16 in the series. ... The Red Sox beat the Diamondbacks for the first time at Fenway Park after losing the other four meetings. The only team Boston hasn't beaten there in the regular season is the Chicago Cubs. They haven't played each other at Fenway. ... Byrnes made outs in his first two at-bats and was 0-for-7 since returning Monday from a right hamstring injury before getting a single in the fourth. ... David Ortiz, sidelined the last 22 games with a wrist injury, might hit off a tee Wednesday. ... Kevin Youkilis, who didn't start after being hit in the face by a one-hop throw in practice Monday, replaced Brandon Moss at first base in the ninth.