Robbie Grossman drew a bases-loaded walk in the 11th inning, Jeimer Candelario homered twice, and the Detroit Tigers pulled out an 8-7 victory over the Tampa Bay Rays on Sunday.

The walk issued by J.P. Feyereisen (4-4) brought in Victor Reyes.

"I was swinging (with the count) 3-1," Grossman said. "I wanted to get another chance to get a good pitch to hit but I saw it as a ball out of his hand."

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Candelario’s second homer, a two-run shot, tied the game in the 10th after the Rays took a 7-5 lead in the top of the inning. Kyle Funkhouser (7-3) pitched a scoreless inning to pick up the win.

Yandy Diaz doubled twice and drove in three runs for Tampa Bay. Brett Phillips, activated off the 10-day injured list earlier in the day, hit a two-run homer during the Rays’ four-run eighth. Nelson Cruz also homered for the Rays, his 31st.

The AL East-leading Rays dropped two of three at Detroit, their first series loss since Aug. 13-15 at Minnesota.

"They did a heck of a job fighting back each inning," Phillips said. "It’s something we’re very familiar with ourselves. It’s a tough one to lose but that’s how it’s going to be when we face teams down the stretch."

Candelario’s first homer gave Detroit a 2-1 lead in the fourth.

Phillips’ two-run homer and Yandy Diaz’s two-run double in the eighth moved the Rays in front, 5-2.

The Tigers tied it in the bottom of the inning on Miguel Cabrera’s two-run single and Phillips’ throwing error from right field, which allowed pinch-runner Derek Hill to score.

"We did a nice job of hanging in there all the way to the end," Tigers manager A.J. Hinch said. "So proud of them for responding after the four-spot, which was a gut punch. In the end, we outplayed ’em."

Kevin Kiermaier had an RBI groundout after Diaz’s 10th-inning double. Candelario tied it once again with his two-out, two-run blast.

"It’s always great to put the barrel on the ball and contribute," Candelario said.

Andrew Kittredge surrendered Candelario’s tying homer.

"Hung a breaking ball and unfortunately, made me pay for it," Kittredge said.

DOWN TO THREE

Plate umpire Sean Barber was a late scratch. A three-man crew worked the game with Mark Carlson taking Barber’s spot.

ROSTER MOVES

Rays: RHP Nick Anderson (right elbow sprain) was reinstated from the 60-day IL and OF Brett Phillips (right ankle sprain) was activated from the 10-day IL. RHP Chris Archer (left hip discomfort) was placed on the 10-day IL and RHP Shawn Armstrong was designated for assignment.

UP NEXT

Rays: RHP Ryan Yarbrough (8-4, 4.90 ERA) is expected to start the opener of a three-game series at Toronto on Monday. Yarbrough recorded two victories against the Blue Jays in July. He allowed seven runs in two innings at Boston last Monday.

Tigers: RHP Wily Peralta (3-3, 3.60) will face Milwaukee on Tuesday. Peralta will be seeking his first victory since July 18. He allowed one earned run in a four-inning outing at Pittsburgh last Tuesday.