NEW YORK — Third baseman Mike Moustakas is no longer a Kansas City Royal.

The Royals traded Moustakas to the Milwaukee Brewers late on Friday night.

The Royals received outfielder Brett Phillips, who will join the major-league club as soon as possible, according to team officials, and right-handed pitcher Jorge Lopez in exchange for Moustakas.

Phillips, 24, was hitting .240 with 12 doubles, seven triples and six home runs in 71 games for Class AAA Colorado Springs. Lopez, 25, also spent most of his season at Colorado Springs. He posted a 5.65 ERA in 24 relief appearances, earning five saves in seven opportunities. Lopez was optioned to Omaha.

Trading Moustakas’ was inevitable. The Royals signed him to a one-year contract with a mutual option for 2019 for $6.5 million during spring training with the intent of flipping him for the right price at the deadline. But when asked about the potential of Moustakas not returning to Kansas City as a Royal on the final day of the latest homestand Wednesday, manager Ned Yost pushed back.

“Dayton (Moore) has made it clear we’re not giving Moose away,” Yost said. “If anybody thinks that we’re giving Moose away or it’s his last game, you’re going to have to come with something if you want Moose playing on your team. Because he’s a big part of our team.”

Moustakas, 29, compiled a 13.4 Baseball-Reference WAR and batted .251 across 934 games with the Royals. His 139 home runs rank eighth in franchise history, four fewer than John Mayberry’s 143 and 21 shy of matching Alex Gordon and Frank White’s 160. Moustakas might have been closer to the top of the career home runs list had he not torn the anterior cruciate ligament in his right knee and undergone season-ending surgery after he collided with Gordon on a play in foul territory in Chicago in late May 2016.

Last year’s American League Comeback Player of the Year, Moustakas clubbed a franchise-record 38 home runs in 2017. He was slowed by a swollen knee toward the end of the season but still eclipsed Steve Balboni’s mark of 36 homers in the 16th game he appeared in after tying the record on Sept. 1.

Moustakas, a two-time All-Star, set career high in runs scored (75), RBIs (85), slugging percentage (.521) and total bases (289) in 2017. Despite posting those numbers in his final season before becoming a free agent, Moustakas languished on the free agent market after turning down the Royals’ qualifying offer of $17.4 million. He accepted a salary on March 10 that would, with an additional $2.2 million in performance bonuses, match the $8.7 million he earned in 2017.

Moustakas had been the subject of trade speculation throughout the season. Jon Heyman of Fancred reported after Thursday night’s 7-2 loss in the Bronx that the Yankees viewed the price tag on Moustakas as too high.

But the Brewers, who signed former Royals center fielder Lorenzo Cain to a five-year, $80 million contract in January, didn’t. A December 2010 trade with the Brewers that netted Cain, Alcides Escobar and Jake Odorizzi — who was flipped to the Rays in exchange for James Shields and Wade Davis in December 2012 — was pivotal in the Royals’ postseason run four years ago. The Brewers, who have a 60-46 record and are chasing their first postseason run since they won the National League Central division in 2011, hope to see the favor returned as Moustakas joins Cain in Milwaukee.

Where they were previously at a disadvantage, the Royals will now have a glut of outfielders at the major-league level as Jorge Soler works his way back from a broken bone in his right foot. Phillips, a sixth-round pick of the Astros in the 2012 draft out of Seminole (Fla.) High School, will likely be worked in at center field alongside Brian Goodwin, whom the Royals acquired from the Nationals on Sunday, and Rosell Herrera.

Phillips was the Astros’ second-ranked prospect when he was traded by Houston along with pitchers Adrian Houser and Josh Hader and right fielder Domingo Santana to the Brewers for outfielder Carlos Gomez, right-hander Mike Fiers and other considerations on July 30, 2015. He made his major-league debut June 5, 2017, and has batted .257 (28 for 109) with three doubles, one triple, four homers and 16 RBIs across stints in two seasons. He last played for the Brewers from July 15-25. Baseball America ranked Phillips as the Brewers’ seventh-best player after the 2017 season.

Lopez, a native of Cayey, Puerto Rico, was selected by the Brewers in the second round of the 2011 draft out of the Caguas Military Academy (P.R.). He made his major-league debut on Sept. 29, 2015, and was last with the Brewers this week.

Moustakas set a Royals record for home runs in a postseason with five in 2014. He was one of the few still on the Royals’ roster this season who captured back-to-back American League Championships in 2014 and 2015 and won the World Series in 2015.

Combined with the free-agent departures of Cain and first baseman Eric Hosmer, Moustakas’ departure reinforces the reality of the end of an era that saw Kansas City celebrate its first championship in 30 years.