St. Petersburg, FL (SportsNetwork.com) - Jake Elmore homered in his first at- bat of the season after being called up from the minors and the Tampa Bay Rays rallied for a 7-5 win over the Boston Red Sox on Wednesday.

Elmore's solo homer -- his first for the Rays -- came after he was recalled from Triple-A Durham earlier in the day and punctuated a two-run seventh inning that gave the home team the lead.

Steven Souza Jr. also hit a solo homer for Tampa Bay, but left the game with a right forearm cramp apparently suffered when he struck out swinging to end the sixth inning.

The Rays had 12 hits and rallied back from a 5-1 deficit to snap a four-game losing streak that included Tuesday's 1-0 loss to Boston in the series opener.

Dustin Pedroia hit a two-run homer and David Ortiz added a solo blast for the Red Sox, who had won two in a row.

Boston right-hander Joe Kelly escaped trouble until the sixth inning, when he was chased during a four-run Tampa Bay rally that tied the score at 5-5. He was charged with five runs on eight hits and a walk and had seven strikeouts in his first career appearance against the Rays.

"The sixth inning has become a challenge for our rotation," Red Sox manager John Farrell said. "We can't shut the inning off."

Nathan Karns, in his first career outing against Boston, gave up five runs in six innings. The right-hander allowed seven hits and four walks.

Five consecutive Rays batters reached base to start the sixth, knocking Kelly out of the game and sparking the four-run rally.

Kelly was replaced by Craig Breslow after giving up consecutive singles to Asdrubal Cabrera, Evan Longoria, Desmond Jennings and Allan Dykstra, whose hit scored a run, and a bases-loaded walk to Logan Forsythe. Brandon Guyer greeted Breslow with a two-run single to make it 5-5.

After Brad Boxberger (1-1) replaced Karns for the seventh and struck out the side, the Rays took the lead in the bottom of the inning. Cabrera and Longoria hit consecutive singles off Edward Mujica (1-1) to start the rally and Cabrera scored when Jennings grounded into a double play. Elmore followed with a homer to left to give the Rays a 7-5 lead.

"That was a huge hit to give us a two-run lead," said Rays manager Kevin Cash. "We knew he gave good at-bats in spring training, but the gap power kind of surprised us a little bit."

Steve Geltz worked around a Pedroia single in the ninth inning to earn his first major league save.

Souza hit his fourth homer of the season with one out in the first inning, driving a 96 mph fastball into the seats behind left field.

Pedroia also hit his fourth homer, on a 92 mph fastball with one out in the third after Mookie Betts walked. Hanley Ramirez drew a two-out walk to keep the inning going and scored from first on Mike Napoli's single up the middle, which was deflected by Karns and the second baseman Forsythe.

Ortiz ripped a solo homer into the right-field seats with one out in the fifth inning, his third of the season, to give the Red Sox a 4-1 lead. Ramirez added a single and Napoli followed with a ground-rule double but the Rays stuck with Karns, who got out of the jam.

Ryan Hanigan stroked a one-out double off Karns in the sixth and scored on Betts' single to make it 5-1.

Game Notes

The Rays announced Wednesday that left-handed reliever Jeff Beliveau will have surgery to repair a torn labrum in his left shoulder and will miss the rest of the season ... Elmore became the 11th player to homer in his first at-bay with the Rays. He was added to replace second baseman Ryan Brett, who went on the 15-day disabled list with a shoulder injury. Brett is the 11th player the Rays placed on the disabled list this season ... Red Sox right fielder Shane Victorino, who was hit by a pitch in the fourth inning, was taken out for a pinch-hitter in the fifth.