ST. PETERSBURG, Fla. — Joey Rickard had four hits and the Baltimore Orioles needed all of them to beat the Tampa Bay Rays.

None was bigger, however, than the last one.

Rickard drove in the winning run in the 11th inning with an RBI double, lifting the Orioles to a 6-5 victory Thursday night.

"This game is very hard and when something goes your way, it's a relief," Rickard said. "That moves you along a little bit."

Rickard doubled off Diego Castillo (0-1) after two-out singles by Chris Davis and Rio Ruiz kept the inning alive for Baltimore.

After coming into the game on an 0 for 15 slide, Rickard reached base five times and drove in two runs against the team that drafted before losing him in the Rule 5 draft in 2015. He has 28 RBIs in 36 career games against the Rays.

"Oh man, it's just a coincidence that it happened," he said, "but it's nice to get a good win."

Rickard's success against Tampa Bay wasn't lost on Rays manager Kevin Cash.

"He seems to like playing at this ballpark or against his former organization," Cash said.

Davis had entered the game as a defensive replacement in the ninth inning after missing the preceding two games with a stomach virus.

"He sparked us, obviously," Orioles manager Brandon Hyde said. "I talked to him about some late-inning stuff and he was ready to go. He's a pro."

John Means (2-2) got the win with two innings of relief for the Orioles, who broke a six-game losing streak against Tampa Bay.

The Rays lost for only the second time in 10 games.

Trey Mancini had three hits, and Pedro Severino homered for the Orioles.

Tommy Pham had four hits, included his third home run of the season for the Rays, but was picked off while trying to steal third base with the score tied in the ninth after Avisaíl Garcia homered off Mychal Givens.

Austin Meadows led off the first for Tampa Bay with a double off the top of the centre-field wall off Baltimore starter Andrew Cashner. Meadows scored on Pham's single to put the Rays up 1-0.

Mancini, Dwight Smith Jr., Renato Nunez and Rickard had hits in the third to give the Orioles a 2-1 lead off Jalen Beeks. Rays opener Hunter Wood gave up two hits in two shutout innings before giving way to Beeks.

Pham's homer in the third off Cashner tied it for the Rays, but the Orioles went out in front again on Severino's blast off Beeks to lead off the fourth.

Rickard led off the seventh with a triple and scored on a single by Richie Martin to put Baltimore up 4-2. Smith's sacrifice fly in the eighth made it 5-2.

But the Rays stormed back to tie it. Mike Zunino's two-run double cut Baltimore's lead to 5-4 after a couple of walks in the eighth. Garcia tied it with a long home run off Mychal Givens in the ninth.

Cashner gave up two runs on five hits in five innings while striking out six for Baltimore.

"We almost came back and won it," Pham said. "It's a pretty loss. You'd rather have the ugly win, but it's a pretty loss."

TRAINER'S ROOM

Orioles: RHP Alex Cobb (lumbar strain) will come off his second stint on the injured list to start Friday night's game.

Rays: LHP Blake Snell (broken fourth right toe) threw for a second straight day and might have a bullpen session Saturday. . . . IF Joey Wendle (strained left hamstring) is likely to be activated this weekend.

SIX-MAN ROTATION OPTIONS

Cobb's return to the Orioles' pitching rotation, Means goes to the bullpen. But Means (1-2, 1.98) will get another start sometime after Thursday's off day. "Means is going to make a lot of starts," Hyde said. "It's something we're going to play with because I do like John in the rotation. He's pitching really well and deserves to stay in the rotation."

UP NEXT

Orioles: Cobb (0-0, 3.18) will make his second start of the season in the opener of a three-game series against Minnesota in Baltimore.

Rays: Ryne Stanek (0-0, 1.93) will open Friday night's game against the Boston Red Sox and Eduardo Rodriguez (1-2, 7.98)

___

More AP MLB: https://apnews.com/MLB and https://twitter.com/AP_Sports