BOSTON (AP) Matt Moore helped keep Tampa Bay's stay in last place a short one.
Moore settled down after a rocky start and allowed the Rays' hitters to do the same as Tampa Bay rallied to a 5-2 victory over the Boston Red Sox on Tuesday night.
Moore (2-4) fell behind 2-0 right away, allowing two hits and walking two in the first, but didn't give up another run and won his first start since July 12.
''You could see he was gaining confidence back in his stuff and he was trusting it,'' said Mikie Mahtook, whose two-run homer in the eighth helped seal the victory for Moore. ''To see him go out and do that, especially after giving up the two runs early, then pretty much just shutting them down the rest of the game was pretty impressive and it was good to see.''
One night after falling into last place in the AL East after Boston's late rally, the Rays reversed the bottom of the standings again and put the Red Sox back in last.
Mahtook had two of the Rays' eight hits, all of which came after Boston rookie Henry Owens was perfect through four innings.
While Owens (3-3) was great early, Moore was solid after getting out of the first and kept it within reach for the Rays.
''It's a good feeling to know that I'm throwing up zeros while we're trying to score runs and keeping the game competitive,'' Moore said. ''The guys did a really good job just being relentless and staying on him. Owens threw a pretty good game.''
Owens didn't allow a hit until Logan Forsythe led off the fifth with a double and scored Tampa Bay's first run later in the inning on a sacrifice fly. It got much worse for Owens in the sixth.
''I think I just did a poor job those last few innings,'' Owens said.
Owens walked Richie Shaffer to start the inning and hit Brandon Guyer with one out. Mahtook singled to load the bases. Evan Longoria hit a sacrifice fly to right and Tampa Bay got another run when Mookie Betts' throw home sailed high and ended up in the stands for a 3-2 lead.
Moore allowed seven hits and didn't give up another run after the first inning.
The Red Sox loaded the bases with one out and Travis Shaw drove in two runs with a single, his first of three hits.
After not allowing a hit through four innings, Owens was tagged for seven before leaving after 7 1-3 innings. He struck out five and allowed five runs, four earned.
Boston manager Torey Lovullo said Owens was still pitching well enough after seven innings to leave him in the game, especially with Boston down only 3-2 before Mahtook tagged Owens for the two-run homer that cleared the Green Monster in left field.
''Henry Owens has gotten us deep into games and helped us win games, and I thought he deserved opportunity tonight,'' Lovullo said. ''I don't think I could have slept tonight if we took him out of the game.''
Mahtook is hitting .391 (18 for 46) since being recalled from Triple-A Durham on Sept. 1. He said he didn't see his home run clear the wall in left field, but his teammates certainly did.
''He's making the most of an opportunity right now,'' manager Kevin Cash said. ''He's even making more of those opportunities. He's done a tremendous job since he's been back up here in September.''
Rays: RHP Nathan Karns won't make another start this season because of tightness in his forearm, Cash said. Cash said it was a precautionary move and the club didn't want to risk turning something minor into a major injury with the season about to end.
Red Sox: 2B Dustin Pedroia, who had three hits Monday in Boston's 8-7 win, had the night off, Lovullo said. ... 3B Pablo Sandoval missed his second straight game with a respiratory infection.
Rays: LHP Drew Smyly (3-2) threw a season-high 107 pitches Friday in an 8-6 win over Baltimore. He allowed a season-high five earned runs, but had enough offensive support to get the victory.
Red Sox: RHP Rick Porcello (8-13) will face the Rays for the fourth time this season. He has gone 2-0 against them so far, with 19 strikeouts and only four walks.