Bob Melvin wanted to put an end to the Pirates' suddenly competent offense, and thought knew just how to do it.

The Oakland Athletics manager summoned lefty Jerry Blevins, his third pitcher of the game, to face Pedro Alvarez. What better way to end an inning?

But Alvarez singled, scoring a run and personifying the Pirates' momentary rediscovery of their offense.

Twice during Wednesday's 5-0 win against the A's at PNC Park, the Pirates sent eight men to the plate in an inning. They forced A's starter Tommy Milone from the game before he completed three innings. They amassed 12 hits and went 5 for 9 with runners in scoring position after going 2 for 14 in the previous two games of the series.

"That's the thing we're capable on offense, we haven't done enough of," manager Clint Hurdle said. "That one more hit, move the chains again."

The top of the order -- Starling Marte, Jose Tabata and Andrew McCutchen -- combined to go 6 for 13 with four runs scored. Pedro Alvarez had two hits and two RBIs and raised his average to .253. His hitting streak is now at eight games.

"I just think we went up there and stayed within our approach," Alvarez said. "Swung at our pitches. Early on we got a couple of strikeouts and I think we did a good job after that of staying within ourselves and waiting for him to come to us and putting some good wood on some balls."

The Pirates avoided a sweep and improved to 54-36 with three games against the New York Mets remaining before the All-Star break. The Pirates are off today.

Solid gray clouds hovered over the city at game time and rain delayed the first pitch by 2 hours, 50 minutes. Rain also delayed Tuesday's game.

"Whatever it's going to take, that's what we got to do," Hurdle said. "So they started a little cry in there that was, late and wet is how we like it, especially as it got later and wetter."

The Pirates knocked Milone, who pitched 8 1/3 innings in his previous start, from the game in the third. Starling Marte got away with stretching a single into a double on a ball hit to Yoenis Cespedes, who has a strong arm. It paid off. After failing to drop a bunt, Jose Tabata doubled to left-center and scored Marte.

Andrew McCutchen flared a single to right that scored Tabata, and the Pirates had a 2-0 lead with no outs.

Russell Martin grounded to short. The A's forced McCutchen out at second, but Grant Green's throw to first was off target and Martin reached second. Alvarez's single scored Martin.

Three consecutive singles scored two runs in the fourth, with Alvarez providing the final blow.

Milone (8-8) needed 80 pitches to complete 2 2/3 innings. He allowed three runs on seven hits.