DENVER -- The Pittsburgh Pirates are on such a roll, they're starting to call their own shots.
With two runners on, Pittsburgh down to its last four outs and trailing 4-2, reliever Bobby LaFromboise casually told starter Jeff Locke a home run was coming.
One pitch later, Pedro Alvarez gave Pittsburgh the lead and made LaFromboise prophetic.
Alvarez hit a go-ahead three-run homer in the eighth inning and the playoff-bound Pirates rallied to beat the Colorado Rockies 5-4 on Thursday.
Outfielder Starling Marte had four hits and was 13-for-20 in the four-game series for the Pirates, who moved to within 3 1/2 games of St. Louis in the National League Central. The Cardinals played Milwaukee later Thursday.
Pittsburgh, which clinched at least a wild card Wednesday, has won six in a row. It was also the 10,000th victory in franchise history.
The Rockies, behind six strong innings from starter Chad Bettis, led 4-2 entering the eighth before the Pirates rallied against reliever Jairo Diaz (0-1). Marte and second baseman Neil Walker had one-out singles and after shortstop Jordy Mercer struck out, Alvarez hit a 97-mph fastball on a line into the Colorado bullpen to make it 5-4.
It was Alvarez's 26th home run of the season.
"I knew I hit it well," Alvarez said. "You never know how the ball's going to play in this park. I was hoping like heck that it had enough to go out."
LaFromboise added intrigue to the afternoon by calling Alvarez's shot while sitting in the trainer's room with Locke.
"He just said, 'Pedro's going to hit a home run right here.' Next pitch it was gone," Locke said. "That's the mentality in the clubhouse. We feel like we're going to win every day. It's good to be playing this kind of baseball."
Diaz said it was poor location on the pitch.
"It was a fastball away but I missed," he said. "It was supposed to be away but it was in the middle."
Third baseman Nolan Arenado had two doubles for Colorado, which has lost five straight.
The Rockies took their first lead of the series off Locke in the third inning. Bettis led off with a walk and moved to second on outfielder Corey Dickerson's single. After shortstop Cristhian Adames hit into a force play at second, Arenado doubled to left field to make it 2-1.
The double gave Arenado an NL-best 117 RBIs this season. He is second in the majors to Toronto third baseman Josh Donaldson.
The Pirates, who took a 1-0 lead on Marte's RBI single in the first, tied it at 2-2 in the fifth when third baseman Josh Harrison doubled and scored on a single by outfielder Jaff Decker.
Colorado went back in front in the bottom of the inning on Adames' triple that drove in Dickerson. The Rockies made it 4-2 in the sixth when outfielder Kyle Parker singled, stole second and scored on pinch-hitter Ben Paulsen's single.
Then came the drama and the chess game in the eighth. Manager Walt Weiss had lefty Boone Logan warmed up in the bullpen when the left-handed hitting Alvarez came to the plate. Weiss stuck with the right-handed Diaz, who has become the go-to guy in the eighth inning.
"He's been lights out," Weiss said. "He's been better against lefties than righties and Logan's not going to face Alvarez there. They're going to pull him back."
Weiss stuck with Diaz and Alvarez gave the Pirates a sweep of the series heading into a weekend showdown in Chicago against the Cubs.
"We'll show up," manager Clint Hurdle said. "We'll meet the challenge. That's our goal. It should be a fun, exciting series in Chicago. It should be packed."
NOTES: Pirates OF Gregory Polanco was out of the lineup after tweaking his left knee in the ninth inning of Wednesday night's victory. The injury does not appear to be serious, but manager Clint Hurdle said the team is "better served backing away from him." ... Rockies OF Brandon Barnes suffered a mild left hamstring strain Wednesday and could be out for what's left of the season. "It's possible," manager Walt Weiss said. "Hamstrings are one of those injuries that can linger." ... Pittsburgh 3B Aramis Ramirez missed his second straight game. Ramirez has a tight left groin after legging out a triple Tuesday. ... Colorado 3B Nolan Arenado returned to the lineup after sitting out Wednesday with a forehead contusion.