Elvis Andrus homered early, and then snapped a 10th-inning tie with a two-out infield single that gave the struggling Texas Rangers a 4-3 victory over the Tampa Bay Rays on Friday night.

Andrus, who homered in the first inning, hit a sharp grounder off Brad Boxberger (2-1) that forced Evan Longoria to make a diving stop. Pinch runner Delino Shields scored when the third baseman to was unable to complete the throw to first base.

Alex Claudio (2-0) pitched two innings in relief of Yu Darvish to get the win. The left-hander gave up a leadoff single to Steven Souza Jr. in the 10th, but avoided further damage by getting Adeiny Hechavarria to bunt into a double play and Mallex Smith to fly out.

Texas ended a five-game losing streak.

Rays starter Alex Cobb took a three-hitter and a 3-1 lead into the ninth, but couldn't finish off the Rangers, who erased their deficit with Joey Gallo's double and Shin-Soo Choo's 14th homer within a three-pitch span.