PITTSBURGH — One late-inning rally wasn't enough for the Pittsburgh Pirates.

Trailing and down to their final out on two occasions, the Pirates managed a 7-6 victory over the Milwaukee Brewers that gave them the first five-game sweep in the majors in nearly a dozen years.

With two men on and two outs in the 10th inning and a steady rain turning into a downpour, Josh Bell made solid contact on a pitch from Dan Jennings (3-3). The crack of the bat was followed closely by bolt of lightning from the clouds as Bell left the batter's box.

The ball got past centre fielder Lorenzo Cain and bounced all the way to the wall, scoring Gregory Polanco easily from third. The relay throw beat Colin Moran to the plate but skipped off the pitcher's mound and through the legs of catcher Erik Kratz, giving Pittsburgh an improbable victory.

Bell had gained a tactical advantage when earlier in the at-bat, Jennings had a slider slip out of his hand that nearly went for a wild pitch. With the tying run on third, Bell didn't think Jennings would risk throwing it again.

"I was just dead-red heater," Bell said. "I got it and I put a good swing on it."

The blown save was the first of the season for Jennings. An inning earlier, regular closer Corey Knebel blew his second of the season. After loading the bases with no outs, Knebel got Jordy Mercer to ground into a double play that scored one run, but then pinch-hitter David Freese hit a two-out triple off the right-field wall to tie the game.

"We just didn't make pitches," Brewers manger Craig Counsell said. "That cost us."

The Pirates' five-game sweep is the first in the majors since August 18-21, 2006, when the Yankees took five straight from Boston. It's the first five-game sweep for Pittsburgh since 1996. The Pirates head into the break as winners of six straight and eight of their last nine.

"Just a lot of wins all over the place for a lot of different guys and the team," manager Clint Hurdle said. "Twice to come back against one of the best bullpens in the game, the fight in the club, the fight all over the place, a really fun way to end it in the pouring rain."

Brett Phillips drove in four runs, including an RBI single in the 10th off Pirates reliever Tanner Anderson (1-0). The win was Anderson's first in the majors in his second appearance. Both Phillips and Anderson had been recalled from Triple-A before the game.

Phillips hit a bases-loaded triple in the eighth off Pirates starter Joe Musgrove to give the Brewers a three-run lead. Starling Marte had an RBI single in the eighth for Pittsburgh.

Musgrove threw a career-high 106 pitches over his 7 2/3 innings. He allowed five runs on seven hits, walked four and struck out five.

Milwaukee starter Jhoulys Chacin allowed one hit in 5 1/3 innings, but his throwing error allowed Musgrove to reach base ahead of Corey Dickerson's homer, which was the only damage against him.

Travis Shaw hit his 18th homer of the season in the second.

TRAINER'S ROOM

Brewers: C Manny Pina (left biceps strain) and OF Ryan Braun (back strain) will be eligible to return from the disabled list after the All-Star break.

Pirates: 2B Josh Harrison left the game with left hamstring discomfort. He pulled up running out a ground ball in the fifth inning. ... There is "concern" that C Francisco Cervelli (post-concussive symptoms) might have to move out from behind the plate, general manager Neal Huntington said. Cervelli went on the seven-day disabled list Saturday without a timetable for his return.

UP NEXT

Brewers: Have not announced a starter for Friday's game against the Los Angeles Dodgers. With the activation of LHPs Wade Miley and Brent Suter from the disabled list this week, Milwaukee has six starters on the active roster.

Pirates: RHP Jameson Taillon (6-7, 3.91 ERA) is scheduled to start the second half at Cincinnati on Friday. Taillon held opponents to a .196 average over his last two starts.

___

More AP baseball: https://apnews.com/tag/MLBbaseball