SAN FRANCISCO — David Freese hit his 100th career home run, Elias Diaz and Josh Bell went deep on consecutive pitches and the Pittsburgh Pirates beat the Giants 10-5 on Thursday night.

Ivan Nova allowed two runs in six innings to continue a stellar stretch on the road for Pittsburgh’s starters. Adam Frazier added three singles and two RBIs, his fourth multi-hit game in the last six.

The Pirates have won three in a row overall and improved to 8-2 in their last 10 at AT&T Park.

Joe Panik and Steven Duggar drove in two runs apiece for San Francisco.

Freese singled and scored on Diaz’s homer in the second, then broke the game open with his milestone home run, a three-run blast off Mark Melancon in the seventh.

Diaz and Bell homered off starter Andrew Suarez (4-8) in the second.

Nova (7-6) lost to the Giants in May but was sharper this time. He retired the first 11 batters and didn’t allow a hit until Austin Slater’s leadoff single in the fifth. Nova yielded three hits and had three strikeouts.

Pirates starting pitchers have a 2.20 ERA over their last 10 road starts.

Former Pittsburgh star Andrew McCutchen went hitless in four at-bats for the Giants but made a pair of sparkling defensive plays against his former team.

A five-time All-Star and a Gold Glove winner for the Pirates as a center fielder in 2012, McCutchen threw out Frazier at second after he lined a ball into right leading off the game. In the sixth, McCutchen raced into the alley in right-center and made a diving grab to rob Diaz of extra bases.

Pittsburgh scored five unearned runs in the seventh after back-to-back errors by second baseman Panik and third baseman Evan Longoria.

TRAINER’S ROOM

Giants: RHP Jeff Samardzija (shoulder inflammation) threw 40 pitches in a bullpen session and will face hitters next week. ... 1B Brandon Belt (hyperextended right knee) ran the bases and took batting practice. ... Catcher Nick Hundley is being evaluated for a concussion.