Michael Pineda proved to be quite the buzz kill.

There had been an unmistakable, and seldom heard, excitement at the Stadium the previous two nights, much of it having to do with the Yankees’ new toy at the back end of the bullpen, the seed-throwing Aroldis Chapman.

But there was also an offense showing some long-awaited pop, with Yankees bats taking advantage of the batting practice-like pitches thrown by a pair of the Royals’ struggling starters. It took Michael Pineda a half-inning to torpedo much of that momentum in a 7-3 loss to Kansas City Wednesday night at the Stadium.

The inconsistent Pineda allowed four first-inning runs, three on Salvador Perez’s two-out blast, before settling down for four innings. He could not make it out of the sixth, however, and when Nick Goody allowed two inherited runners to score, Pineda saw his ERA climb to 6.28 from 5.73. Pineda allowed six runs and six hits in 5 2/3 innings in falling to 1-4.

Royals righthander Yordano Ventura allowed five runs in each of his previous two outings, both of which lasted four innings. Ventura (3-2) wasn’t close to terrific this time but avoided the big inning, allowing three runs and six hits in six. He walked three, struck out one and threw a wild pitch.

Pineda labored through a 36-pitch first.

advertisement | advertise on newsday

Alcides Escobar led off with a single but Brian McCann threw him out trying to steal second. Pineda hit Lorenzo Cain in the left knee. Eric Hosmer’s sharp grounder to first could have been turned into a double play, but the ball skipped under the glove of Dustin Ackley, filling in for the injured Mark Teixeira. That play, generously scored a hit, put runners at the corners for Alex Gordon, whose sacrifice fly made it 1-0.

Pineda hung a 1-and-1 slider to Perez, who destroyed it to left for his fifth homer to make it 4-0. Cheslor Cuthbert reached on an infield hit — Ackley failed to come up with the scoop after shortstop Didi Gregorius made a diving stop in the hole — but Pineda struck out Christian Colon, the eighth Royal to bat, to end the inning.

Carlos Beltran put the Yankees (13-19) on the board in the second, cracking a 2-and-0 fastball to right for his seventh homer, and third of the series. Chase Headley flared a two-out single to left later in the inning, driving in Aaron Hicks (three hits) to make it 4-2.

The Yankees blew a chance to draw closer in the fourth. Hicks singled to left, took second on a wild pitch and moved to third on Gregorius’ groundout to second. Headley, with the infield in, grounded to first and Ben Gamel grounded back to Ventura for the third out.

The Yankees inched within one in the fifth. Brett Gardner walked and went to third on Starlin Castro’s double, a ground smash down the leftfield line. McCann got the run in with a groundout to first, making it 4-3. Castro, however, would stay at third as Beltran grounded sharply to first and Ackley grounded to short.

Yankees videos

The Yankees looked as if they’d dodge a bullet in the sixth but could not.

Pineda walked Perez and got Cuthbert to ground into a 4-6-3 double play. But Pineda walked Colon and allowed a single to Jarrod Dyson, and Joe Girardi called on righthander Nick Goody to face Escobar. Goody, making his fourth appearance of the season, hit Escobar with a pitch to load the bases. Lorenzo Cain, who homered three times the night before, sent a 2-and-2 slider back up the middle for a two-run single to make it 6-3.

Kendrys Morales’ homer off Phil Coke in the seventh made it 7-3.