OAKLAND — Matt Chapman got robbed of his first major league hit on a replay overturn in the second inning Friday night.

It was just a pause for dramatic effect.

Digging in with the bases loaded and one out in the eighth, Chapman laced a two-run single to left field that proved the difference in Oakland’s 7-6 victory over the New York Yankees before a spirited crowd of 30,184 at the Coliseum.

Chapman had registered his first RBI in the second, when he appeared to beat out an infield tapper that scored Yonder Alonso. The Yankees challenged, and Chapman was ruled out at first on a replay reversal. He flied to center in the fourth and struck out in the seventh before coming through against Jonathan Holder in the eighth.

Holder jumped ahead 0-2 and tried to bury a curve low and away, but Chapman went down and got it, yanking it inside the left-field foul line and erasing what was a 6-5 A’s deficit.

A large portion of the crowd was pro-Yankees and cheering wildly for Northern California native Aaron Judge, who didn’t disappoint with a three-run homer off Sean Manaea and a triple off the center field wall. But it was the A’s portion that went home happy on a warm Fireworks Night at the Coliseum.

Rookie moment: The A’s scored four times in the second to grab an early lead, the rally featuring three run-scoring hits. Three rookies drove in runs during the rally — Chapman, Jaycob Brugman and Chad Pinder. Stephen Vogt also drove an RBI double off the wall in right-center. But, as has been their way lately, the A’s couldn’t make that lead stand and required a comeback. It marked the seventh game in a row that Oakland has scored first, and they are just 3-4 in those games.

Doing it with the glove: Chapman, starting at third for the second night since his first big league call-up, turned in his first defensive highlight. He made a diving backhand stop of Ronald Torreyes’ grounder in the sixth and quickly sprung to his feet and delivered a strong throw across the diamond.

All good things come to an end: Sean Manaea dazzled over his previous five starts, winning all of them and allowing a total of seven earned runs. But staked to the early four-run lead Friday, he couldn’t make it stand. And it was a couple of New York’s big boppers that did the damage. Judge went to the opposite field with a three-run shot in the third, immediately after the A’s had taken their 4-0 lead an inning earlier. Then Chris Carter, who likes nothing better than the sight of an A’s uniform on the mound, hit a 430-foot shot to center in the sixth to put the Yankees up 5-4.

Manaea gave up five runs on eight hits in six innings of work.

Delivering Judge-ment: Judge’s three-run shot to right field was his major league-leading 23rd homer of the season. The Yankees home run leader for all of 2016 was Carlos Beltran, who finished with 22.

Casilla slams the door: A night after coughing up the tying run in the ninth, closer Santiago Casilla notched his 11th save. He was visited by trainer Nick Paparesta with two outs in the ninth but finished out the game with a strikeout of Starlin Castro.

Cahill, a 2006 A's second-round draft pick, pitched for Oakland from 2009-11. He started 96 games in three seasons with the A's, going 40-35 with a 3.91 ERA and 1.32 WHIP. Since Oakland traded him to the Arizona Diamondbacks in Dec. 2011, Cahill's pitched for six teams.

The 30-year-old won a World Series ring with the Chicago Cubs in 2016, and pitched for the San Diego Padres and Kansas City Royals last season. In 2017, he went 4-3 in 21 appearances (14 starts) with a 4.93 ERA and 1.62 WHIP.

Cotton, 26, went 9-10 with a 5.58 ERA in 2017 after a rookie season in which he went 2-0 with a 2.15 ERA in five starts. Leading up to the injury, he was 0-1 with a 3.75 ERA over four appearances in spring training.