ST. PETERSBURG, Fla. — It was a big finish for Blake Snell and a dismal finish for the Baltimore Orioles, who fell into last place on the final day of the season.

Snell struck out a career-high 13 in seven innings Sunday and the Tampa Bay Rays beat the Baltimore Orioles 6-0.

The Rays won their last four games to finish at 80-82, a 12-game improvement over last season.

Baltimore went 75-87, a 14-game drop from 2016. The Orioles lost 19 of their last 23, getting shut out five times.

"We scored what, three runs in 27 innings? It's been a challenge for us lately, for sure," manager Buck Showalter said.

The game drew a crowd of 16,018, bringing Tampa Bay's season attendance to 1,253,619, the lowest in the majors.

Snell (5-7) gave up two hits and walked none. The lefty struck eight of the first 12 Orioles before Trey Mancini led off the fifth with a clean single up the middle for Baltimore's first hit.

Snell went 5-1 with a 2.84 ERA over his last 10 starts after going 0-6 with a 4.98 ERA in his first 14 starts, which spanned a trip to the minors.

"I'm happy that the first half happened," he said. "It made me a lot better, and it made me have the second half that I had because I was hungry to finish strong. I really put things together that I needed up here."

Curt Casali hit his first homer of the season, connecting off Kevin Gausman (11-12) in the fifth.

Consecutive hits by Corey Dickerson, Lucas Duda, Evan Longoria and Logan Morrison helped the Rays tack on five runs in the eighth off reliever Brad Brach.

"Seeing Blake Snell finish the way he did was awesome," said Longoria. "But there's no victory when you're going home on the last day of the regular season."

Mancini's hit was his 159th of the season, the second-most by a Baltimore rookie. Eddie Murray had 173 hits in 1977.

The only other hit off Snell was Mark Trumbo's infield single in the seventh.

"Obviously we didn't finish this season very well," said Gausman, who went seven innings for the ninth time in his 34 starts. "It's unfortunate. We put ourselves in the situation to kind of be within striking distance going into the last month. We just didn't play very good baseball, kind of in all aspects of the game, too. It was frustrating."

ORIOLES, RAYS PITCHERS TIE STRIKEOUT RECORDS

The Orioles struck out 18 times, tying a franchise record for a nine-inning game. The Rays' 18 strikeouts (13 by Snell, two by Brad Boxberger, three by Chaz Roe) also tied a club record for a nine-inning game.

TRAINER'S ROOM

Orioles: Richie Bancells, head athletic trainer and a member of the Orioles organization for 41 years, announced his retirement.

Rays: OF Kevin Kiermaier, who returned from a two-day bout with the flu to have a big game Saturday night, was given the day off.

UP NEXT

In 20 weeks, pitchers and catchers will report in Sarasota for the Orioles and Port Charlotte for the Rays.