PITTSBURGH (AP) Josh Harrison tripled leading off the bottom of the ninth and scored when the throw from the outfield skipped past Milwaukee third baseman Hernan Perez and out of play to lift the Pittsburgh Pirates to a 3-2 victory Tuesday night.
Perez's RBI single off Pittsburgh All-Star closer Mark Melancon with two outs in the ninth tied the game, but the tie was short-lived. Harrison's drive off Tyler Thornburg was just out of the reach of Milwaukee center fielder Kirk Nieuwenhuis. Harrison chugged to third then popped up and strolled home when the relay throw from second baseman Scooter Gennett went by Perez.
The victory gave the Pirates a spirited start to a favorable 20-game stretch in their schedule they hope will give them some momentum as they try to stay in the NL wild-card race.
More from FoxSports
Pirates rookie Jameson Taillon pitched six innings in his return from the disabled list, narrowly avoiding serious injury after taking a line drive off his head in the second.
With one out, Perez sent a liner toward the mound that drilled Taillon on the back of the head. The 24-year-old rookie lay on the ground for several moments while being tended to by trainers but was permitted to stay in the game.
The scare hardly seemed to faze Taillon, who allowed one run and five hits, striking out three without a walk before being removed after throwing 65 pitches in his first start since being placed on the disabled list on June 28 with right-shoulder fatigue.
David Freese hit an RBI single off Junior Guerra in the first inning for the Pirates and Francisco Cervelli followed with a sacrifice fly in his return from a broken bone in his left hand.
Chris Carter doubled leading off the fourth and scored on a groundout by Perez but otherwise Taillon kept the Brewers in check as he outpitched Guerra, a fellow rookie who has been one of the bright spots for the struggling Brewers, who have dropped five of six.
Guerra's only wobble came in the first, when two walks and a single by Andrew McCutchen loaded the bases with one out. Freese loped a soft single to right field and Cervelli's fly to left easily scored McCutchen to give Taillon an early lead. Guerra surrendered one more hit through six innings, walking three and striking out six.
Pittsburgh is looking for a fourth consecutive playoff berth and general manager Neal Huntington pointed to the return of Taillon and Cervelli as hope the team may not need to go shopping at the trade deadline for help.
Taillon was solid during his first month in the majors before the team shut him down briefly due to concerns about his workload. He was fresh in his first start in three weeks, working quickly and retiring the last nine batters he faced before turning things over to a bullpen that rounded into form following a rocky start.
The only hiccup lately has come from Melancon, who blew a save for a second straight game.
Pirates: RF Gregory Polanco went 0 for 3 with a walk and a run scored while showing no ill effects from a sore left hamstring that kept him sidelined since July 8.
Brewers: Chase Anderson (4-10, 5.44 ERA) will try to get a handle on his control issues on Wednesday night when he makes his second start of the season against the Pirates. Anderson has issued a career-high five walks in each of his last two starts, both losses to St. Louis.
Pirates: Jeff Locke (8-5, 5.26 ERA) will try to win his fourth straight decision on Wednesday night when he makes his 18th start of the season. Locke is 5-5 with a 3.76 ERA in 13 career starts against the Brewers.