The more one sees of Williams Perez, the harder it is to believe the rookie right-hander wasn’t ranked among the Braves’ top 20 prospects when the season began.

Perez beat the National League’s hottest team and one of its hottest pitchers to earn his first major league win in his third start, limiting the Giants to four hits and four walks in seven innings of an 8-0 win on a cool Saturday night at AT&T Park.

Jace Peterson had a double and triple in his first three-hit game, and the Braves snapped San Francisco’s six-game home winning streak with their second win in nine games against the Giants over two seasons.

“With the way he’s been pitching, we know if we can get some runs we’ll have a good chance to win,” Peterson said after Perez trimmed his ERA to 2.66, including 1.00 as a starter. “So yeah, we came out aggressive and put some good at-bats together.”

It was a much-needed offensive outburst from the Braves, who’d batted .188 during a 3-5 stretch in which they had totaled 13 runs and scored three or fewer in every game.

Former Giant Juan Uribe hit a towering two-run homer for the Braves in the three-run ninth inning, his second of the season and first since being traded from the Dodgers. The third baseman also had a single, a double and a walk in five plate appearnces, and was booed each time he was introduced.

Uribe hit 24 homers for the Giants in 2010, then went to the Dodgers as a free agent.

“For me, the main thing today was we won the game,” said Uribe, who made his presence felt in his third start since last week’s trade. “I had a good game, that’s great, it’s good for me and for the team. More important to win the game. I felt good today. I helped my team win.”

It was the third loss in the past 16 games for the Giants, who hit .306 and averaged more than six runs in that stretch before bumping into the Braves’ stocky young Venezuelan pitcher. Perez allowed just four singles, three on ground balls.

“From the first pitch I knew I had command of every pitch,” said Perez, who had three strikeouts and threw 63 strikes in 105 pitches. “From the first inning I felt good today.”

Perez rounded out his night with a two-out single in the sixth inning, his first major league hit.

The Braves got one run in each of the second through fifth innings against Tim Lincecum (5-3), who gave up eight hits and four runs in 4 1/3 innings and had his four-start home winning streak snapped. The former two-time Cy Young Award winner had been 4-0 with a 2.05 ERA in five May starts, including 3-0 with no runs allowed in three home starts.

He got outpitched by Perez, who turned 24 on May 21. The kid with the uncommon mound presence made big pitches to get outs when he needed them most, just as he had in his first two starts. But this time he got real run support, with the Braves pushing across more runs in the first five innings than their combined total of three runs scored while he was in his first two starts.

The Giants had posted a stunning 0.67 ERA during a six-game home winning streak before Saturday, when the Braves scored more runs than San Francisco pitchers allowed in that entire streak, which included four consecutive shutouts. The Giants had outscored the Braves 11-2 in the first two games of the series and were 7-1 against the Braves since the beginning of the 2014 season.

But the Giants had never faced Perez, who didn’t allow a runner to reach third base until the sixth inning. When the Giants got runners on the corners with one out in the sixth after a leadoff walk and a single, Perez struck out Brandon Crawford and got Angel Pagan on a groundout to end the inning.

“He has the sinker to get a lot of ground balls, and today we saw that,” said manager Fredi Gonzalez, whose Braves will try to salvage a split of the series Sunday. “For a kid who’s only made three starts, he’s pretty composed out there. It sure didn’t look like it in that very first (relief) outing that we saw from him. But you know what, he’s been good (since), he’s been impressive.”

Four of the six runs Perez has allowed came in his first major league appearance, a relief stint that lasted one-third of an inning at Washington. Since then, he’s given up just two runs in 20 innings over four games (three starts).

“I wasn’t expecting it,” Perez said through a translator, bullpen coach Eddie Perez. “I’m very surprised, and I’m going to work hard to continue to pitch like that…. I want to thank the Braves because they gave me the opportunity to be a starter, and I’ve got everything going my way.”

The Giants also had two runners on in the first inning after a two-out single by Hunter Pence and a Brandon Belt walk, but Perez induced an inning-ending groundout by Crawford to prevent the Giants from taking an early lead.

The four runs against Lincecum were three more than he allowed in 27 combined innings while winning four home starts in a row.

The eight hits by the Braves against the right-hander were three more than he’d given up during any of his five previous starts this month.

The Braves jumped out to a 1-0 lead in the second ining after a leadoff single by Markakis and a walk by Uribe, a former Gian. One out later, Andrelton Simmons hit an RBI single up the middle that glanced off the glove of shortstop Crawford.

They pushed the lead to 2-0 in the second inning after Peterson hit a one-out single, stole second base and went to third on catche Andrew Susac’s throwing error on the play. Cameron Maybin drove him in from there with a single through the right side of the infield.

Uribe hit a leadoff double in the fourth and scored on Christian Bethancourt’s two-out single.