J.D. Martinez hit four singles and Sandy Leon knocked in the winning run in the eight as the Red Sox beat the Rays 4-3 Sunday at Fenway Park.

One of Martinez's hits was a ground ball to left field that scored Eduardo Nunez and Andrew Benintendi, cutting the Red Sox deficit to 3-2.

Hanley Ramirez scored later in the inning on a Jackie Bradley Jr. sacrifice fly to right field, tying the game 3-3.

Leon slapped an RBI single down the third-base line against Rays closer Alex Colome to put the Red Sox ahead for the first time, 4-3.

The Red Sox, who came in with five losses in their last seven games, rallied from a 3-0 deficit to become the first team in baseball to reach 20 wins.

Boston's win breaks-up Tampa Bay's eight-game winning streak, a stretch that included victories against the Red Sox in the first two games of their three-game series.

Rick Porcello pitched a season-high of 7.2 innings, scattering seven hits and three runs while walking none and striking out six.

Closer Craig Kimbrel got the final out of the eighth and escaped a jam in the ninth to earn the win.

The Red Sox will open a three-game set with the Kansas City Royals Monday night at Fenway Park.