NEW YORK — J.A. Happ made the midseason impact the Yankees hoped for, pitching one-run ball over six innings to win his New York debut 6-3 over the Kansas City Royals on Sunday.

Three days after New York acquired the 35-year-old left-hander from Toronto for infielder Brandon Drury and outfield prospect Billy McKinney, Happ took a shutout into the fifth before Salvador Perez's opposite-field home run into the Yankees bullpen in right-center. Happ (11-6) struck out two and walked one, and the first-time All-Star ended a four-start winless streak.

New York (67-37) began the day 5½ games behind AL East-leading Boston and with just 16 wins in its last 31 games. The Yankees sought a boost similar to the one provided by David Cone, who made his Yankees debut exactly 23 years earlier after his acquisition from Toronto and became a key cog in the team that reached that year's playoffs and won four World Series titles in the following five seasons. Happ joined a rotation that includes Luis Severino, Masahiro Tanaka, CC Sabathia and Sonny Gray.

"I feel like in a lot of ways he's been underrated over the years," Yankees manager Aaron Boone said. "I feel like he's more in that upper tier than people want to acknowledge."

Aaron Hicks hit a two-run homer in the first off the screen attached to the right-field foul pole, a drive off Burch Smith (1-2). Hicks also doubled, singled and walked for the Yankees, who took three over four against the woeful Royals (32-73), who traded star third baseman Mike Moustakas to Milwaukee on Friday.

Brett Phillips, one of those prospects, started in his Kansas City debut and made a leaping catch at the top of the right-field wall — with his eyes closed as the ball landed in his glove — to rob Austin Romine of a possible three-run homer in the fourth.

Hunter Dozier homered off Chad Green in the seventh and Rosell Herrera went deep against David Robertson leading off the eighth, the first home run of his big league career. Aroldis Chapman struck out three straight batters for his 28th save in 29 chances, his 20th in a row.

Kansas City lost for the 12th time in 15 games at Yankee Stadium, and for the 18th time in 24 games against the Yankees. After beating Detroit last week for his first big league win since 2013, Smith gave up five runs, five hits and three hits in four-plus innings.

Miguel Andujar added a two-out, run-scoring single in the fourth, and a successful replay challenge led to two more runs and a 5-0 lead in the fifth. Gleyber Torres hit a bases-loaded bouncer to second baseman Whit Merrifield, who reached to tag Hicks running from first and then threw to first to retire Torres. Second base umpire Chad Whitson called Hicks out, but replays showed Hicks swerved slightly to the infield side while remaining in the baseline and avoiding Merrifield's glove.

Greg Bird followed with a bouncer to second, but Merrifield was in short right field and had a long sprint in to reach the ball. The slow-footed Bird smiled as he crossed first with a run-scoring infield hit.

Giancarlo Stanton had a sacrifice fly in the sixth.

SEATS

A crowd of 46,192 was New York's 20th home sellout, matching 2011 for the most at the new Yankee Stadium.

CLEANING UP

Torres and Andujar on Saturday became the first different Yankees rookies to hit cleanup in the starting lineup of consecutive games since Bill Robinson and Steve Whitaker in a doubleheader at Chicago on Aug. 22 1967.

SWAPS

New York traded LHP Caleb Frare to the Chicago White Sox for international signing bonus pool allocation. The 25-year-old is 4-1 with a 0.81 ERA and five saves of 31 games for Double-A Trenton this year and one for Triple-A Scranton/Wilkes-Barre.

TRAINER'S ROOM

Royals: OF Brian Goodwin injured his left groin running the bases in the seventh inning Saturday night and a DL stint is possible.

UP NEXT

Royals: LHP Danny Duffy (6-9, 4.70) opens a series at the White Sox on Monday.

Yankees: RHP Masahiro Tanaka (8-2, 4.09) starts Tuesday's series opener against Baltimore and RHP Yefry Ramírez (1-3, 3.49). Tanaka is 6-0 in 12 starts since an April 17 loss at Miami and is coming off a three-hit shutout at Tampa Bay on Wednesday.