A late-game surge pushed the Marlins to a 5-2 win in Kansas City, stopping the Royals' consecutive series victory streak at seven.
After a pure pitcher's duel Monday, Kansas City (62-56) opened the scoring in the first inning with a Salvador Perez RBI single.
Miami tied the game in the fourth with a run-scoring single from Justin Ruggiano, but the Royals quickly jumped back on top. David Lough grounded into a fielder's choice in the bottom of the frame, scoring Chris Getz for a 2-1 lead.
The Marlins (46-73) hung a pair of runs in the seventh and ninth innings off Tim Collins (2-6) and Luke Hochevar to establish a 5-2 advantage. The rally began when Elliott Johnson committed an error in the seventh, allowing a grounder to pass through his legs.
Ervin Santana lasted six innings, giving up a run and eight hits while striking out three batters. Kansas City knocked out Miami starter Jacob Turner after five innings while slapping four hits and drawing six walks.
The Royals begin a five-game series with AL Central-leading Detroit on Thursday.