Santana hit a two-run homer to break a fifth-inning tie as the Royals won consecutive games for the first time since May 17-18.
''Carlos is confident right now,'' Royals manager Mike Matheny said. ''It was good to see from the left side, too, because I know he takes that personal. That ball was hit.''
''We feel confident,'' Santana said. ''It's good to win two days in a row, but we have to keep it up. A lot of our younger players have good talent.''
The last-place teams have had 30 players age 25 or younger on their rosters ths season, including the Royals' Bobby Witt Jr. and Orioles catcher Adley Rutschman, who were ranked as the top two big league prospects entering the season.
Former Gold Glove catcher Matheny had high praise for Rutschman's glove work.
''He got off to kind of a rough start (at the plate),'' Matheny said. ''But you watch his mannerisms and it was almost like he kicked it up to another level when he got behind the plate. He's a guy who understands the importance of that position.''
Witt and Melendez played large roles Thursday. Witt had two hits and stole two bases, while Melendez homered, drove in two and scored twice.
''They're dangerous,'' Matheny said. ''The guys are young but they're learning fast and they're making great adjustments. MJ taking his walks, and display(ing) his power. And the same with Bobby taking really great at-bats. They seem to be ahead of where they should be.''
''I feel like we're all having really great at-bats,'' Melendez said. ''We're doing a really good job of getting guys in scoring position. I'm making the pitcher come to me. If he doesn't want to pitch to me I have full confidence in the guy behind me to get the job done. Just trying to make him make a perfect pitch every time.''
Witt's double set up Salvador Perez's two-run single. Melendez followed with his fifth homer for a 4-1 third-inning lead as Kansas City batted around against Jordan Lyles (3-5), who allowed six runs, eight hits and three walks over five innings.
''I didn't enjoy the way things went on my end,'' Lyles said. ''I need to be better, and figure it out in between starts and get rid of this little tough stretch I've been through.''
The Orioles sent nine batters to the plate in the fifth and chased Kris Bubic, tying the score.
''I thought overall I executed more pitches tonight than I did the previous outing,'' Bubic said. ''I just thought execution-wise with everything, probably much better. I just happened to get away with it last outing.''
''I thought his pitch execution was better,'' Matheny said. ''He established with his fastball, used his breaking ball and got some swing-and-miss on it, and then the changeup was still really good. When he elevates it leads to a lot of foul balls and those foul balls turn into higher pitch counts.''
Joel Payamps (2-1) worked out of a bases-load jam to pick up the win with four outs in relief while Scott Barlow earned his sixth save.
''We've worked Scott pretty hard,'' Matheny said. ''I didn't want to have to go get him to get that third out in the eighth, but the game was on the line. The best part of their order was coming up. He just figures out how to get it done.''
Orioles RHP Austin Voth, claimed off waivers from Washington on Tuesday, was activated. INF Chris Owings was designated for assignment. RHP Spenser Watkins was reinstated from the 15-day IL and optioned to Triple-A Norfolk.
Orioles LHP Bruce Zimmermann (2-4, 4.87 ERA) takes the mound on Friday, and RHP Jonathan Heasley (0-3, 4.62 ERA) goes for the Royals.
More AP MLB: https://apnews.com/hub/MLB and https://twitter.com/AP-Sports
Copyright 2022 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.