ST. PETERSBURG (AP) - The Tampa Bay Rays had to hang on for dear life Tuesday night to get their first win in a week.
And the way they see it, that might be a good thing.
"We've got to get on a roll now," manager Kevin Cash said after the Rays' 5-4 squeaker over the Baltimore Orioles ended a five-game losing streak. "I'm hoping that a close win like this is more beneficial than winning a game that gets separated early and there's no intensity.
"There was plenty of intensity."
Welington Castillo's two-run single off Tommy Hunter reduced the Rays' lead to 5-4 in the eighth. They threatened again in the ninth with two-out singles by Manny Machado and Jonathan Schoop, but Alex Colome got Mark Trumbo on a ground ball to hand the Orioles their third loss in nine games.
"We never give up. We've just got to put together good at-bats like we did today," Castillo said. "We didn't get them today, but we're always going to go out there and compete."
Tim Beckham's three-run homer capped a five-run inning and rookie Jake Faria pitched into the eighth inning, when Tampa Bay's early five-run lead got down to one.
Faria (5-1) posted his eighth quality start in nine starts, giving up three runs and seven hits while striking out five in 7 1/3 innings.
Colome pitched the ninth for his 29th save after the Orioles got the potential tying run in scoring position in each of the last two innings.
"To come out and put up five runs early and then hold it down late, that last inning was a big boost," Faria said. "Hopefully we can take it and run with it."
Beckham's 12th home run was the fifth hit of the second inning off Wade Miley (4-9). Steven Souza Jr., Brad Miller, Adeiny Hechavarria and Mallex Smith all singled and scored in the Rays' big inning.
Trey Mancini homered for the Orioles.
Evan Longoria's leadoff double in the eighth was Tampa Bay's only hit after the second inning.
Miley had given up six or more hits in each of his nine previous starts. He gave up five runs while walking three and striking out four in six innings.
Manny Machado drove in Baltimore's first run with a sacrifice fly in the fifth, and Mancini's 16th home run came in the sixth.
1B Logan Morrison (6 for 33 since the All-Star break) and All-Star OF Corey Dickerson (.189 in his last 20 games) were not in the Rays' lineup against the left-handed Miley.
Orioles: 1B Chris Davis missed a second straight game due to illness. Manager Buck Showalter said Davis has regained some strength and might play Wednesday. ... IF Ryan Flaherty (right shoulder strain) will begin a rehab assignment Thursday at Double-A Bowie.
Rays: CF Kevin Kiermaier (broken right hip) said he will start a minor league rehab assignment Thursday at Class-A Charlotte and hopes to return when eligible to come off the 60-day disabled list Aug. 9. ... C Wilson Ramos, who needed six staples for a cut after being struck by a piece of a broken bat Monday, grounded out as a pinch hitter Tuesday night and could start Wednesday.
RHP Ubaldo Jimenez (4-6) will pitch Wednesday's series finale for the Orioles, having given up 12 runs in 5 2/3 in his two starts against Tampa Bay. Alex Cobb (8-6) will make the Rays' 500th straight start by a pitcher under 30.