PITTSBURGH (AP) -- With one swing of the bat, Jason Bay turned a miserable night into an ecstatic one.
"That's the funny thing about baseball," said Bay, who struck out three times. "One at-bat can turn a bad day into your best day."
Bay's 16th homer came off Jason Hammel (3-3), who was in his second inning of work. He drove a 2-2 fastball into the left-field bullpen, ending a 3 hour, 53 minute game that was delayed 42 minutes at the start.
"In that situation, with the game in extra innings, every guy is swinging as hard as they can," Bay said. "I had been fouling off pitches all night, putting myself into bad counts. Lucky for me, I got a pitch over the plate."
John Van Benschoten (1-2), who was recalled from Triple-A Indianapolis before the game, pitched a scoreless inning of relief and picked up the victory.
Van Benschoten, the No. 8 overall pick in the 2001 draft, earned his second career win and first since September 10, 2004, against Houston. The right-hander improved his career record to 2-12.
"It's definitely a confidence booster," Van Benschoten said. "It was definitely a good way to end the night. That was a grind out there. It was huge to win the game."
T.J. Beam, also recalled from Triple-A before the game, pitched two scoreless innings. In all, five Pirates relievers limited Tampa Bay to one run and three hits in seven innings.
"They all threw the ball outstanding," Pirates manager John Russell said.
Bay's hit highlighted a game that was tied three times and featured some clutch pinch-hitting in the late innings.
The Pirates took a 3-2 lead with a run in the seventh. Adam LaRoche drew a walk against Tampa Bay starter Edwin Jackson leading off. Bautista sacrificed him to second. After an out, Doug Mientkiewicz, pinch-hitting for reliever Tyler Yates, drove a 3-2 pitch into the center-field gap for a run-scoring double.
"I really didn't know it was 15 pitches until I came in and watched," Gomes said. "I thought it was eight or nine. I kept battling. Leading off late in the game, I was just trying to get on base and make contact. ... In long at-bats, the batter has an advantage. You've seen all of his pitches. You've got his velocity down."
Emergency starter Ty Taubenheim pitched six effective innings for Pittsburgh. He allowed two runs and seven hits, struck out four batters and walked three. He also drove in his first career run with a double in the fifth.
"He pitched really well," Tampa Bay manager Joe Maddon said. "He settled in, and his ball was moving well. He had a lot of poise. And he's a pretty good hitter, too."
Taubenheim was called up from the minor leagues on Friday night to fill in for the injured Phil Dumatrait. The 25-year-old right-hander was making his first appearance in the major leagues since June 23, 2007, when he was with the Toronto Blue Jays. He was optioned back to Triple-A after the game. The Pirates are expected to make a corresponding roster move Sunday.
Jackson allowed three runs and six hits in 6 2/3 innings. He struck out three and walked two. Jason Bartlett had two hits and a walk for the Rays.
Rays second baseman Akinori Iwamura served the first of his three-game suspension, forcing Maddon to juggle his lineup. Among the changes, Upton hit leadoff, Iwamura's usual spot, and Willy Aybar started at second. ... Nady, who is recovering from a bruised left shoulder, made his first official start since June 14. He was in the starting lineup during Thursday's rainout against the New York Yankees and walked as a pinch-hitter Friday night against the Rays. ... As part of African-American heritage weekend, the teams wore Negro League uniforms. The Pirates wore Pittsburgh Crawfords uniforms, and the Rays wore Jacksonville Red Caps uniforms.