PITTSBURGH -- Ahead in the count 2-0 with the game tied in the ninth inning, Todd Frazier figured there was only one type of pitch he was going to see.
"I know he didn't want to walk me and put a guy on base," Frazier said. "I was looking to get a fastball I could handle and, fortunately, I was able to connect."
Frazier's team-leading 16th home run to center field came off closer Jason Grilli (0-2) and gave the Reds their fifth victory in six games. Cincinnati (34-35) also got within one game of .500 on its ninth try.
"You can't fall behind the first guy you face, especially in a tie ballgame," Grilli said. "He dives over the plate. ... It just didn't work out."
Frazier leads NL third basemen in homers, extra-base hits (31) and slugging percentage (.524).
"He's very confident now that he can be a major league player," Cincinnati manager Bryan Price said of Frazier, who is in his fourth season. "He's been able to put home runs, RBIs, run production into one package."
Hamilton is 8 for 13 in his last three games. Cincinnati is 5-2 and averaging 5.3 runs per game since Votto was activated from the disabled list after missing three weeks with a quadriceps strain.
Logan Ondrusek (2-2) got four outs for the victory. Aroldis Chapman pitched a scoreless ninth for his 12th save, getting Clint Barmes to fly out to the left-field fence with two runners on to end the game.
"It was an interesting game in a lot of ways," Price said. "Both teams had their moments and we had to have some good things happen to win the game. It would have been nice if it were a little easier on the stomach."
Price's stomach was certainly churning when left fielder Chris Heisey, a late-inning defensive replacement for Ludwick, had to race to the fence to catch Barmes' drive.
"It carried farther than I thought," Heisey said. "Fortunately, it stayed in the park."
Josh Harrison matched a career high with four hits for the Pirates. He drove in two runs.
Andrew McCutchen extended his hitting streak to 12 games but came up short of becoming the first Pittsburgh player to have multiple hits in nine straight games since Rennie Stennett in 1971. Gregory Polanco became the first Pirates player to have a hit in each of the first seven games of his career since Hall of Famer Roberto Clemente in 1955.
The Pirates used a three-run seventh inning to tie the score at 5 on RBI singles by Davis, Russell Martin and Harrison.
Cincinnati starter Johnny Cueto's hard luck continued as he gave up two runs in six innings of a no-decision. Cueto scattered seven hits and four walks, but the bullpen failed to hold a three-run lead for him. Despite a sparkling 1.92 ERA, Cueto is 6-5 through 15 starts.
In two starts against the Pirates in April, he allowed one run and six hits in 18 innings.
Pittsburgh's Brandon Cumpton gave up three runs and eight hits in six innings after winning his previous two starts.
Pittsburgh 2B Neil Walker took batting practice and fielded grounders before the game for the first time since undergoing an appendectomy June 9. He is optimistic he will be ready to be activated from the disabled list June 24, the first day he is eligible. ... Pirates LHP Francisco Liriano is scheduled to play catch Thursday for the first time since sustaining a strained left oblique June 10 and going on the DL. ... Phillips' string of 43 consecutive plate appearances without a strikeout, the longest active streak in the majors, ended when he fanned in the seventh. ... Cincinnati RHP Alfredo Simon (9-3, 2.95 ERA) opposes Pirates RHP Edinson Volquez (4-5, 3.89) on Wednesday night.