BOSTON — Mitch Moreland feels like he’s fit right in with the Boston Red Sox.

Moreland hit a go-ahead, two-run single in the seventh inning and drove in three runs, helping the Red Sox rally to a 7-5 victory over the Tampa Bay Rays on Sunday.

Boston trailed 5-4 before loading the bases against Danny Farquhar (0-1). Moreland singled off left-hander Xavier Cedeno, who already has blown three leads this season.

“The group of guys in here just make it easy,” Moreland said. “It’s been a smooth transition. When you have that, you get pretty comfortable, pretty quick.”

Moreland, signed as a free agent to a $5.5 million, one-year deal, has gone 16 for 33 after opening hitless in 12 at-bats.

“He’s put together a number of quality at-bats of late,” Boston Manager John Farrell said.

Red Sox slugger Hanley Ramirez advanced from first to second on Moreland’s hit but limped off with what the team called a left hamstring cramp.

“I’ll be fine,” Ramirez said. “I’ll be in there tomorrow.”

Pablo Sandoval had a two-run homer for the Red Sox, who won their second straight. Mookie Betts and Christian Vazquez each had three hits.

Vazquez added an RBI double in the eighth against Austin Pruitt.

Joe Kelly (2-0) allowed one hit in 22/3 scoreless innings, and Craig Kimbrel struck out two in a perfect ninth for his fifth save.

Brad Miller had a two-run triple and Tim Beckham and Corey Dickerson hit solo homers for the Rays, who have lost five of six heading into Monday morning’s Patriots’ Day finale of the four-game series.

Tampa Bay took a 3-0 lead in the first.

“It was a little bit of a frustrating loss,” Manager Kevin Cash said. “We had a few opportunities, but were unable to hold the lead.”

Beckham homered in the fifth for a 5-4 lead against Drew Pomeranz, who allowed five runs and five hits in 41/3 innings with 10 strikeouts.

Sandoval tied the score 4-4 in the third when he homered off Alex Cobb, who gave up four runs and 11 hits in five innings. He jumped a couple of times to celebrate with teammates on his way back to the dugout.

“It was a weird one,” Cobb said. “Some situations that I put myself into or things didn’t go your way happened.”

TRAINER’S ROOM

RAYS: Right-hander Jake Odorizzi went on the 10-day DL, a day after he strained his left hamstring. Right-hander Chase Whitley was recalled from Triple-A Durham.

RED SOX: Center fielder Jackie Bradley Jr., on the 10-day DL because of a sprained right knee, is scheduled to play a pair of games at Triple-A Pawtucket before he is activated. … Dustin Pedroia fouled a ball off his left ankle and limped around but stayed in the game.

STRANGE START

Pomeranz threw his first seven pitches of the game for balls and got a mock cheer when he threw a strike. He also had a wild pitch.

CONTACT

Cobb failed to strike out any batters for the first time in 89 career starts.

“I think it comes back to not getting any strikeouts,” he said of his outing. “You’ve got to have times in the game where you can rely on that swing-and-miss pitch. I just didn’t have it today.”

MORE CONTACT

Betts hasn’t struck out in 119 plate appearances, the majors’ longest stretch since Juan Pierre of the Marlins went 147 in a row in 2004.

UP NEXT

RAYS: Left-hander Blake Snell (0-1, 3.18 ERA) is slated to start the series finale.

RED SOX: Knuckleballer Steven Wright (0-1, 13.50) is set to start in his first outing since giving up four homers in 11/3 innings against Baltimore.