BOSTON (AP) -- Jalen Beeks made his major league debut at Fenway Park earlier this season, and it didn't go well. Neither did his next appearance on that mound.
Traded away by Boston last month, Beeks returned Sunday with the Tampa Bay Rays and fared a lot better.
Beeks pitched four strong innings and the Rays limited Boston to two hits, blanking the AL East leaders 2-0.
"I didn't pitch well here the first two times I pitched here, so it felt good here to get the team a win," Beeks said. "It was satisfying."
The 25-year-old lefty was tagged for five runs in the first inning by Detroit on June 7. More than a month later, he allowed three runs in just 2 1/3 innings against Texas, leaving him with a 12.79 ERA for Boston.
That was the end of his career with the Red Sox, who dealt Beeks before the trade deadline for pitcher Nathan Eovaldi.
Facing the team with the best record in the majors, Beeks (2-1) gave up one hit in relief, striking out three and walking two.
"He was throwing harder. I saw 94 (mph)," Boston manager Alex Cora said. "I didn't see that here. Besides that, same cutter, fastball, breaking ball. He did a good job."
Joey Wendle and C.J. Cron homered as the Rays topped Boston for just the fifth time in 16 games this season. Six of those Tampa Bay losses have been by one run.
The Red Sox has lost only four of their last 21 games. They were shut out for the fifth time this season.
Sergio Romo worked the ninth for his 16th save and 100th of his career. Reliever Diego Castillo started for the Rays, getting five outs. It was the club's 34th time to have a reliever start, and was Castillo's first major league start.
"It's just a different philosophy," Boston's Mookie Betts said. "We have to adjust. We just didn't swing it well. They pitched it well and we didn't swing it well."
Hector Velazquez (7-1) gave up a run and three hits in four innings. He took Chris Sale's turn in the rotation a day after the ace lefty was put on the 10-day disabled list for the second time in nearly three weeks with mild shoulder inflammation.
Wendle hit his homer into Boston's bullpen in the second. Cron hit his 24th off a billboard above the Green Monster seats in the ninth.
Boston's best chance came with two on and no outs in the fourth, but MLB RBIs leader J.D. Martinez bounced into a double play.
Martinez went 0 for 3, snapping his streak of reaching base successfully in home games at 51 straight, the third-longest string in club history. Ted Williams owns the record with 69 in 1941 and Joe Foy is next with 54 in 1966.
RF Betts made a charging, diving catch of Cron's liner in the fourth and 3B Eduardo Nunez made a sliding stop to his left on Tommy Pham's grounder before throwing him out.
Rays: C Jesus Sucre returned to the lineup after missing the previous four games with a sore right wrist. He went 0 for 4 with two strikeouts and bounced into a DP.
Red Sox: LHP Eduardo Rodriguez (10-day DL, sprained right ankle) is slated to have a rehab start for Double-A Portland on Monday. ... Knuckleballer Steven Wright (DL, left knee inflammation since late June) is expected to pitch a live batting practice this week.
Rays: RHP Ryne Stanek (1-3, 2.74 ERA) is slated to start the opener of a four-game series Monday at home against Kansas City RHP Jorge Lopez (0-2, 4.44).
Red Sox: RHP Rick Porcello (15-5, 4.04) is set to face Cleveland ace Corey Kluber (15-6, 2.68) when the AL Central leaders come to Fenway on Monday for the opener of a four-game series.