It would have been hard for Manny Machado to have a better series to start his career, as the Orioles concluded a four-game set against Kansas City with a 5-3 win on Sunday.

Machado homered for the third time in four games and drove in two runs, and finished his first series in the majors 6-for-16 with three homers, a double, a triple and seven RBI.

"He hurt us," Royals manager Ned Yost said. "He won two games for them against us with homers. Hit the ball to center field, hit the ball to left field. I was really impressed for a kid who hasn't played much third base."

Nick Markakis added a double and a homer for the O's, who have won seven of their past nine and salvaged a split against the Royals.

Bruce Chen (8-10), who received a loss for the fourth time in his last five decisions, gave up four runs on four hits in 5 1/3 innings. He added five strikeouts.

Mike Moustakas homered for the Royals, who have lost two out of three on the heels of a three-game win streak.

Markakis flied a 3-2 sinker over the right-field fence to tie the game at three in the fifth inning.

After Luis Ayala (4-3) tossed a perfect sixth, the Orioles took the lead. Chen issued a pair of one-out walks before exiting the game. Mark Reynolds greeted Louis Coleman with a base hit to left field to give Baltimore a 4-3 edge.

"He has a good slider," Reynolds said. "I knew that was the pitch he was going to try to get me out with. He's tough. He steps right at you and throws across his body. I just told myself that I had to stay on it. I put a good swing on it and he made a mistake."

Troy Patton and Pedro Strop held the Royals scoreless in the seventh and eighth and the Orioles tacked on an insurance run in the bottom half of the eighth on a passed ball. Jim Johnson retired the Royals in order in the ninth to pick up his 34th save.

Machado got the Orioles started in the second inning. After Reynolds worked a walked, Machado drove a 2-2 sinker over the center-field fence to give the O's an early two-run lead. With the blast, Machado matched a club record with an extra-base hit in his first four games with Baltimore.

Moustakas brought the Royals within a run in the fourth when he finished off a seven-pitch at-bat with a high drive off the right-field foul pole for his 18th home run of the season.

Following the Moustakas homer, Billy Butler and Jeff Francoeur singled and Eric Hosmer walked to load the bases with one out. Brayan Pena lofted a sacrifice fly to left field to tie the game in the fourth.

Kansas City went ahead in the fifth when Alex Gordon and Alcides Escobar started the inning with a pair of singles to put runners on the corners. Tommy Hunter minimized the damage, inducing a double play from Moustakas, but allowed Kansas City to take a 3-2 lead.

Game Notes

Hunter gave up three runs on eight hits and two walks in five innings. He also allowed his 27th home run of the season, tied for the second most in baseball behind Ervin Santana (28)...Outfielder Endy Chavez accepted an outright assignment to Triple-A Norfolk before the game. He was designated for assignment on August 4...The Royals homered for the eighth straight game, matching their season best...The Royals went 0-for-4 with runners in scoring position and stranded six...The Orioles went 2-for-9 with runners in scoring position and left five on base.