It took 6 hours, 7 minutes to finish. Both teams scored a run in the 17th, and each club used eight pitchers.
Alvarez hit his 23rd homer, a solo shot off Barret Browning (1-3). Andrew McCutchen added a two-run single later in the inning.
Wandy Rodriguez (8-12), who was set to start for the Pirates on Monday night at San Diego, got the win with two scoreless innings of relief.
This was the longest game by innings in the big leagues this year. At 6:07, it tied for the longest by time, matching a game between Baltimore and Boston on May 6.
More Sports Headlines
Snohomish mixed martial artist returns to her first love Mariners beat Twins 4-3 in 11 innings 4:03 p.m. Charles scores 29 points, Liberty beat Storm 78-62 4:49 p.m. Park wins Women's British Open, captures 4th different major 4:38 p.m. Perry wins 2nd straight Champions Tour's 3M Championship 4:33 p.m. Merritt shoots 67 to win Quicken Loans National by 3 shots 4:30 p.m. Triple Crown winner American Pharoah wins $1.75 million Haskell Invitational 4:25 p.m. Bills' Ryan names Incognito starting left guard 4:22 p.m.
Our new comment system is not supported in IE 7. Please upgrade your browser here.