ST. PETERSBURG, Fla. — Wilson Ramos homered and drove in three runs against Chris Sale despite the All-Star’s record-setting performance, rookie Jake Faria remained unbeaten and the Tampa Bay Rays beat the Boston Red Sox 4-1 on Thursday night.

Sale (11-4) struck out 12 while giving up four runs and seven hits in seven innings. He became the first Red Sox pitcher to strike out 10 or more in 12 games before the All-Star break, surpassing the 11 games of Pedro Martinez in 1999.

Ramos hit a two-run homer in the sixth inning to cap the scoring. Ramos has three homers this season and has nine RBI in his past five games.

Faria (4-0) gave up a run and four hits while walking four in six innings. The rookie right-hander has pitched at least six innings in each of his six starts and has a 2.11 ERA.

Alex Colome pitched the ninth for his 23rd save.

Boston shortstop Xander Bogaerts left in the first inning with a right hand contusion after getting hit by Faria’s pitch. X-rays were negative.

Deven Marrero entered for Bogaerts and drove in Boston’s run with a sacrifice fly in the third. The Red Sox entered with a four-game lead in the AL East but had only five hits, all singles.

The Rays tied it in the fourth when Logan Morrison singled and scored on Ramos’ double.

Peter Bourjos put the Rays ahead 2-1 with a solo homer in the fifth.

NOTES: Bogaerts will not be headed to the All-Star Game next week after he finished second among five contenders in the American League final fan vote. Royals third baseman Mike Moustakas won the final roster spot. … Red Sox LHP Eduardo Rodriguez, who has been on the disabled list since June 2 with a right knee subluxation, pitched batting practice and will make another rehab start at Triple-A Pawtucket on Sunday before rejoining the rotation after the All-Star break. … Boston LHP Brian Johnson was activated from the DL and optioned to Pawtucket.