ST. PETERSBURG, Fla. — It was a walk in the park for the Tampa Bay Rays, who got home runs from Evan Longoria and Logan Morrison and 10 walks from Baltimore pitchers Friday night in a 7-0 victory that clinched third place in the AL East.

"We walked the ballpark," manager Buck Showalter said after the Orioles' 17th loss in 21 games. "You can't do that."

Longoria led off the fifth with his 20th homer off Baltimore starter Wade Miley, marking Longoria's fifth straight 20-homer season and the ninth of his 10-year career.

"Just to be healthy long enough to do all that is very impressive, and I should say healthy enough because he's never healthy," said Morrison, who hit his 38th homer off reliever Chris Tillman in the seventh.

"I know (Longoria) is going to look back and say this wasn't his strongest (season), but it's still a testament that he's out there, he's grinding through it, he plays through a bunch of injuries constantly," Rays manager Kevin Cash said. "I'm glad he got it so I can give him a day off tomorrow."

Rays starter Jake Odorizzi left his final start of the season after four innings with a sore right knee.

"I could have been greedy and tried to finish that inning just to sneak a win," Odorizzi said, "but I just wanted to be smart and go into the off-season healthy."

Brad Boxberger (4-4) got the win as the first of four Tampa Bay relievers.

Miley (8-15) lost his fifth straight start, giving up four runs and five hits in four innings. He walked five, raising his major league-leading total to 93. The Baltimore bullpen gave up five more walks.

"It's been a long year, no doubt. I didn't perform," Miley said. "I competed, gave it everything I had. It just wasn't very good."

Trey Mancini had one of Baltimore's four hits. It was Mancini's 158th hit, tying Cal Ripken (1982) for second-place all-time among Oriole rookies.

The Orioles, shut out for the 11th time, dropped three games behind Tampa Bay with two games left in the season.

It was the third nine-inning game this season in which the Orioles yielded 10 walks, compared to three games of that type from 2009-2016.

LONGORIA JOINS MATHEWS IN 3B POWER CLUB

Longoria became only the second third baseman to hit 20 home runs in nine of his first 10 seasons. Hall of Famer Eddie Mathews did it in each of his first 14 seasons (1952-65). Only one other AL third baseman (Graig Nettles) has had nine 20-homer seasons at any point in his career.

TRAINER'S ROOM

Orioles: INF Tim Beckham (hamstring) was back in the lineup after missing three games. ... OF Adam Jones did not play because of leg soreness.

Rays: OF Kevin Kiermaier "caught a bug in New York and it drained him pretty good," according to Cash. Kiermaier sat out a second straight game.

UP NEXT

RHP Chris Archer (9-12) will get his major league-leading 34th start of the season for the Rays on Saturday night against RHP Miguel Castro (3-2), who will get his first start for the Orioles after 38 relief appearances.