PITTSBURGH -- Ryan Braun didn't own exclusive rights to the late-innings drama on Monday.

Braun arrived from the airport in time to deliver a game-tying, two-run hit in the eighth inning, and J.J. Hardy and Rickie Weeks combined for four RBIs in the ninth as the Brewers twice came from behind to beat the Pirates, 7-4, at PNC Park on Monday.

Weeks' three-run home run gave the Brewers their first lead since the second inning and extended their winning streak over the Pirates to 16 games. It's the longest active streak in the Majors, and the longest since the D-backs beat the Reds in 16 straight from 2001-03.

"It's not something that factors into the equation for us, but it's pretty remarkable," said Braun, who began his long, strange day in Milwaukee. "That's not easy to do, because [the Pirates] are a really good team. Their starting pitching is great this year, their bullpen has been great. They're running a good team out there."

For the last 16 games, since Tom Gorzelanny beat Milwaukee last May 22, the Brewers have been just a bit better.

"It's not going to continue to happen forever," Braun said, "so we have to enjoy it while it lasts."

This win didn't come easily. The Brewers were in a 3-1 hole before they scored two runs in the eighth inning on Braun's two-run double. The slugger had undergone an MRI scan in Milwaukee earlier in the day searching for the cause of pain in his back. After the Pirates took the lead against Mark DiFelice (3-0) in the bottom of the inning, the Brewers came back again in the ninth against Matt Capps (0-2) with four more.

Hardy lined a tying sacrifice fly with the bases loaded before Weeks blasted a three-run home run to left field.

Weeks' homer provided a bit of redemption. He was furious after an eighth-inning strikeout on which Weeks believed he checked his swing. First-base umpire Jeff Nelson disagreed.

"I haven't been that mad at anything in a long time," Weeks said. "To hit that home run, that felt good."

DiFelice knew that feeling. He had just allowed a pair of two-out hits in the eighth -- a single to Ramon Vazquez followed by a go-ahead double to Wisconsin native Jason Jaramillo. That hit gave Pittsburgh a 4-3 lead.

It didn't last. After the Brewers scored in the ninth, Trevor Hoffman worked around an infield hit for his fourth save.

"I thought we had them," Pirates outfielder Brandon Moss said. "It's just one of those things that happens. They won the battle tonight, and they've won the last few."

Brewers starter Yovani Gallardo surrendered a season-high seven hits along with three walks, but he limited the Pirates to three runs in seven innings and kept the game close for those hitters to break out. They were held to a lone run through seven innings by Pittsburgh starter Paul Maholm, who was charged with two runs on six hits in 7 1/3 innings and struck out seven.

"I thought their guy was very good," Brewers manager Ken Macha said. "He was keeping the ball right at the knees tonight."

But Maholm was relieved after walking Hardy with one out in the eighth and a 3-1 lead. Reliever Tyler Yates struck out Weeks on that check-swing before John Grabow entered the game to face Prince Fielder. It's been a good matchup for Fielder, who improved to 8-for-15 against Grabow when he spanked a single to center field.

Mike Cameron worked a walk to load the bases for Braun.

"We didn't have much going until then," Macha said. "That was huge, to tie the game up."

In the ninth against Capps, who entered the night 5-for-5 in save chances, the Brewers loaded the bases with nobody out for Hardy, whose line drive to right-center field tied the game at 4. Weeks followed with his sixth home run of the season.

It took Gallardo off the hook for what would have been a tough loss. Coming off an eight-inning gem against the Pirates in which he homered for a 1-0 win, Gallardo labored this time. Moss hit an RBI triple that tied the game at 1 in the second inning, Andy LaRoche homered off the left-field foul pole in the fourth and Nate McLouth hit an RBI single in the fifth for a 3-1 lead. For much of the night, Gallardo practiced damage control.

"When the second inning hit, I felt like it was going to be one of those days," Gallardo said. "My command wasn't close to where I had it the last time I started against those guys. But there's going to be days like that. I gave up three runs, but I kept on battling."

"I thought he threw the ball well," Macha said. "He got a little better as the game went on."

So did the Brewers' hitters.