BALTIMORE -- The lead went back and forth, inning after inning. Fortunately for George Sherrill and the Baltimore Orioles, a game that seemed destined to be won by the last team at bat ultimately ended exactly in that fashion.
Baltimore overcame four homers by the Pirates and rallied from deficits of 2-1, 5-4 and 7-6.
"For the guys to come back like they did -- not once, not twice, but three times ... that's just incredible," Orioles manager Dave Trembley said.
After Adam LaRoche hit a two-run homer in the ninth off Sherrill (2-1) to give Pittsburgh a 7-6 lead, Baltimore needed one more uprising to secure the victory and get their closer off the hook.
"It was really big for George. When he gave it up tonight, he was pretty down, especially because of how the game went," Hernandez said. "It was a grind every inning. They score, we score back. It was a long game, then he comes in and gives up the homer."
But Baltimore rallied against Matt Capps (0-2). Salazar, who replaced an injured Melvin Mora in the first inning, tied it with his first home run since April 2002.
Freddie Bynum then drew a one-out walk, stole second after a fly ball by Jay Payton and scored when Hernandez hit a liner to the gap in left-center.
"Weird last couple of innings," Pittsburgh manager John Russell said. "Battled back, got the lead a couple of times and gave it right back to them."
It was the second straight blown save for Capps after he converted 16 in a row.
"I hope for a chance tomorrow; get out there and make it a little bit better," the right-hander said.
Said Russell: "He'll be fine. He's our closer, he's doing a great job for us."
Roberts led off the bottom half with a single against John Grabow, and Markakis followed with a towering drive that landed on Eutaw Street, well beyond the 25-foot scoreboard in right field. It was his 11th homer of the season, tied for the team lead.
But the usually dependable Sherrill, seeking his 23rd save in 25 tries, couldn't make the margin stand up.
In the wild ninth inning, Nady appeared to jam his shoulder on the wall while chasing a foul near the right-field line by Hernandez. He left the game, and his condition wasn't immediately clear.
"The doctor's looking at him and we'll know later tonight what's going on," Russell said.
Mora left in the first inning after fouling a pitch off his left knee. The injury was determined to be a bruise, and team officials deemed him to be day to day. Salazar twice made the final out with runners in scoring position, but made amends in the ninth.
Salazar was recalled from Triple-A Norfolk on Tuesday.
"He looked like a big league hitter right there, didn't he?" Trembley said.
Baltimore starter Radhames Liz retired 14 of the first 16 batters, but the exceptions -- Nady and Sanchez -- both hit solo home runs.
Nady made it 1-0 in the second with his 10th, a shot to center that traveled an estimated 440 feet. After doubles by Jones and Roberts produced a run in the third, Sanchez homered in the fourth to end an 0-for-11 skid.
Baltimore tied it in the fifth on an RBI double by Roberts, and a two-run double by Alex Cintron in the sixth put the Orioles up 4-2.
- Ravens OT Jonathan Ogden, who retired from the NFL on Thursday, threw out the ceremonial first pitch.
- The Orioles hit five doubles and have 29 in seven games, and at least one in 21 straight games.
- Pittsburgh extended its season-high run of errorless innings to 65.
- Markakis' homer was the 43rd in the history of Camden Yards to land on Eutaw Street.