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.

Tampa Bay Rays' Brandon Lowe is congratulated by teammates after hitting a two-run home run during the ninth inning of a baseball game against the Kansas City Royals at Kauffman Stadium in Kansas City, Mo., Thursday, May 2, 2019. The Rays defeated the Royals 3-1. (AP Photo/Orlin Wagner)
Tampa Bay Rays’ Brandon Lowe is congratulated by teammates after hitting a two-run home run during the ninth inning of a baseball game against the Kansas City Royals at Kauffman Stadium in Kansas City, Mo., Thursday, May 2, 2019. The Rays defeated the Royals 3-1. (AP Photo/Orlin Wagner)

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.

Tampa Bay Rays starting pitcher Charlie Morton, left, hands the ball to manager Kevin Cash during the seventh inning of a baseball game against the Kansas City Royals at Kauffman Stadium in Kansas City, Mo., Thursday, May 2, 2019. The Rays defeated the Royals 3-1. (AP Photo/Orlin Wagner)
Tampa Bay Rays starting pitcher Charlie Morton, left, hands the ball to manager Kevin Cash during the seventh inning of a baseball game against the Kansas City Royals at Kauffman Stadium in Kansas City, Mo., Thursday, May 2, 2019. The Rays defeated the Royals 3-1. (AP Photo/Orlin Wagner)

GETTING HOT

Hunter Dozier had two hits. Since an opening 3-for-27 slide, he is 30 for 69 (.435).

STAYING COLD

Chris Owings was 0 for 22 with 10 strikeouts against the Rays this season.

MOVES

Rays: RHP Austin Pruitt, the 26th man during Wednesday’s doubleheader, was returned to Triple-A Durham. Tampa Bay recalled RHP Casey Sadler from Durham for his second stint of the season following a one-day appearance on April 19. He pitched two scoreless innings in his major league debut.

TRAINER’S ROOM

Rays: RHP Hunter Wood was put on the 10-day IL with right shoulder soreness.

UP NEXT

Rays: RHP Tyler Glasnow (5-0), who leads the AL with a 1.75 ERA, starts Friday at Baltimore.

Royals: RHP Jorge López (0-2) starts Friday’s series opener at Detroit.

___