The Kansas City Royals have traded former All-Star slugger Mike Moustakas to the Milwaukee Brewers for minor league outfielder Brett Phillips and minor league pitcher Jorge Lopez.

A key member of the Royals' 2015 World Series championship team, Moustakas became a free agent after last season and signed a one-year contract with the Royals in March that includes a mutual option for 2019. The Royals are last in the American League Central at 31-71.

"We were looking for another big bat to add to the lineup, and we got it," Brewers manager Craig Counsell said Friday night. "We feel like we can put together a really tough lineup on a daily basis now."

The 29-year-old Moustakas is hitting .249 with 20 homers and 62 RBIs this season. Milwaukee announced the trade after beating the San Francisco Giants 3-1.

"Two left-handed bats in the lineup with pop, I'll take it," Chase Anderson, Friday's winning pitcher, said in reference to Moustakas and Brewers first baseman Eric Thames.

Kansas City had left Yankee Stadium when Friday's rainout was announced. Moustakas will be reunited with former World Series champion teammate Lorenzo Cain on the Brewers.

Travis Shaw is the Brewers' regular third baseman. He could move to second to make room for Moustakas. Shaw has been taking grounders at second, although he has never played the position professionally.

"They approached me, I guess, about a month ago and asked my thoughts about how comfortable I was over there, this and that," Shaw said. "I feel like I can do a decent job over there. The world's going to say I can't do it. I take that challenge to heart. It's obviously going to make our lineup better. It's going to make our lineup deeper. Moustakas is a good player. He's won a World Series. He's a middle-of-the-order type of guy. He's going to extend our lineup. He's going to give us another left-handed power guy."

Mike Moustakas joins a Brewers club that has the top spot in the NL wild-card race and is a game and a half behind the Cubs for the NL Central lead. Peter G. Aiken/USA TODAY Sports

The Brewers, whose last playoff appearance was in 2011, are 1½ games behind the Chicago Cubs in the National League Central and have a 2½-game lead for the first NL wild-card spot. Earlier this week, they acquired veteran reliever Joakim Soria from the Chicago White Sox.

"We're focused on the upside offensively to add an impact bat to the lineup, a guy who we think fits our lineup and our ballpark very well," Milwaukee general manager David Stearns said. "The truth is, with the way we move our infielders around, conventional positions don't apply to us all that much. We ask a lot of our infielders ... to play all over the dirt. And so Travis has played all over the dirt for the majority of this season and for most of last season as well."

Moustakas had six career postseason home runs for the Royals. Only George Brett hit more, with 10. With Moustakas' departure, Alcides Escobar, Salvador Perez and Alex Gordon are the only starters for the Royals from the clinching Game 5 of the 2015 World Series still left on the team.

Moustakas was first named an All-Star in 2015. After a right knee injury cut short his 2016 season, he bounced back in 2017 for his second All-Star appearance and was named AL Comeback Player of the Year.

Phillips is the 10th-ranked prospect in the Brewers system, according to MLB Pipeline. He is hitting .240 with six home runs and 25 RBIs for Triple-A Colorado Springs this season, and he saw action in 15 games for the Brewers.

Lopez also has been playing for Colorado Springs, going 3-3 with a 5.65 ERA in 24 relief appearances. The right-hander has appeared in 13 major league games, including 10 this season for Milwaukee.

The Associated Press contributed to this report.