PITTSBURGH -- Clint Barmes was due for a big hit. Long overdue.
The Pittsburgh Pirates shortstop came into Sunday's game with a .093 batting average. He was also hitless in his last 14 at-bats. Furthermore, he had no RBI.
However, Barmes hit singles to drive in the tying and go-ahead runs to rally the Pirates to a 4-2 victory over the Atlanta Braves at PNC Park.
Pittsburgh has won nine of 12 since a 1-5 start. The Braves have lost three in a row and four of five after their 12-1 start.
Barmes broke the tie in the sixth inning off Kris Medlen (1-2), who lost for the first time 29 regular-season starts in which he was given a lead.
With the score tied 2-2, Neil Walker led off the sixth with a single, moved to second on Pedro Alvarez's long flyout to left and took third on Russell Martin's groundout. Barmes then hit a ball up the middle that shortstop Andrelton Simmons was able to reach, but his throw to first was too late.
In six innings, Medlen allowed three runs and six hits. He struck out six and walked one.
Rookie left-handed reliever Justin Wilson (1-0) pitched 1 2/3 innings for his first win in the big leagues. He escaped a first-and-second jam and preserved a 2-2 tie when he entered with one out in the top of the sixth and got B.J. Upton to ground into a double play.
Jason Grilli pitched a scoreless ninth for his seventh save in as many chances.
Pirates starter Jonathan Sanchez was yanked after throwing 74 pitches in three innings. He gave up two runs and four hits with three walks and four strikeouts.
The Pirates added a run in the seventh as Travis Snider scored on Luis Avilan's wild pitch to make it 4-2. Snider and Martin also had two of Pittsburgh's 10 hits.
Gerald Laird and Simmons had two RBI each for the Braves.
Atlanta opened the scoring with two runs in the top of the second off Sanchez after going just 1 for 13 with runners in scoring position in the first two games of the series. With one out, Chris Johnson, Reed Johnson, Laird and Simmons hit consecutive singles.
Pittsburgh answered with two runs in the bottom of the second off Medlen. Martin doubled in Alvarez, who led off with a single, and scored on Barmes' single.
NOTES: Braves second baseman Dan Uggla was out of the lineup Sunday after straining his left calf on Saturday night. Uggla said he felt much better when he woke up Sunday and thought he might be able to play Monday night when the Braves open a three-game series at Colorado. Braves manager Fredi Gonzalez said he may hold Uggla back an extra day just to be safe. ... Atlanta first baseman Freddie Freeman was expected to end his three-game injury rehab assignment with Class AAA Gwinnett on Sunday and then be activated from the disabled list Monday night in time for the Braves' game at Colorado. ... Atlanta right fielder Jason Heyward, who is hitting .121, got the day off because he is 1 for 11 (.091) against Sanchez with seven strikeouts. ... Pittsburgh right-hander Charlie Morton (Tommy John reconstructive elbow surgery in June 2012) has had his rehab assignment moved to Class AA Altoona and will start Tuesday night at Richmond in an Eastern League game. ...Pirates left-hander Francisco Liriano (broken bone in upper right arm) will make his next rehab start for Class AAA Indianapolis on Thursday against Lehigh Valley in the International League. ... Right-hander Jeff Karstens (right shoulder inflammation) threw off a mound Sunday for the third time in five days and is expected to pitch a simulated game against live batters during the latter part of the week. ... Mike Minor (2-1, 0.95) will face Colorado's Jeff Francis (1-1, 8.25) in a matchup of lefties on Monday night. ... Pittsburgh opens a four-game series at Philadelphia on Monday night with A.J. Burnett (1-2, 2.63) facing Tyler Cloyd, who will be recalled from Class AAA Lehigh Valley, where is 0-2 with a 7.07 ERA in three starts.