Brandon Lowe hit a two-run homer off Wily Peralta with two outs in the ninth inning, and the Tampa Bay Rays rallied to beat the Kansas City Royals 3-1 Thursday for a four-game split.

Whit Merrifield became the third player with a two-triple game this season for the Royals, who lead the major leagues with 17 in 32 games. His third-inning triple drove in Martin Maldonado, who beat out an infield hit and is 7 for 13 against Charlie Morton.

AL East-leading Tampa Bay tied the score in the fifth on consecutive singles by Willy Adames, Nate Lowe and Guillermo Heredia.

Peralta (2-2) walked Daniel Robertson on four pitches leading off the ninth, and Lowe connected with two outs for his seventh home run this season.

Adam Kolarek (2-1) got the final two outs of the eighth, and Diego Castillo struck out two in a perfect ninth for his fourth save in as many chances. Tampa Bay won the season series 4-3.

Royals starter Danny Duffy allowed six hits in six innings, while Morton gave up five hits in 6 2/3 innings with nine strikeouts.