ST. PETERSBURG, Fla. (AP) — Jonny DeLuca scored on an error in the ninth inning and the Tampa Bay Rays beat Arizona 5-4 on Friday night to end the Diamondbacks' season-high winning streak at six games.

DeLuca drew a walk from Justin Martinez (5-3), and scored from first when center fielder Jake McCarthy misplayed Brandon Lowe's two-out single that deflected up the middle. Corbin Carroll tied it at 4 on a two-out, two-run homer off Rays closer Pete Fairbanks (3-3) in the ninth. It was Fairbanks' third blown save in 26 chances.

Josh Lowe had a two-run single in a three-run eighth inning against Ryan Thompson that put the Rays up 4-2. Joc Pederson and Lourdes Gurriel Jr. had run-scoring singles in the first for the Diamondbacks, who have overcame a series of injuries to hold one of the NL wild-card spots.

They have won 20 of 26 since the All-Star break and 30 of 41 since late June. Tampa Bay’s Ryan Pepiot allowed two unearned runs and six hits over 5 1/3 innings in his first start since July 14. The right-hander had been sidelined by a right knee infection that was thought to have stemmed from a spider bite and required hospitalization.

Arizona's Ryne Nelson gave up one run, five hits and struck out six in 6 1/3 innings. Dylan Carlson got the Rays to 2-1 on his third homer in 11 games in the fifth, and had an RBI single during the eighth. He had gone deep twice in his previous 102 games.

Arizona's Eugenio Suárez had a pair of interesting at-bats. Suárez was called for a .