SEATTLE (AP) — Champagne flowed in the clubhouse as players bopped around and screamed in a wild celebration after the Oakland Athletics clinched their first playoff berth in four years.

"It's a lot of fun," a soaked Khris Davis said. "We're just trying to enjoy the moment. It's a blast. We've been waiting for this day for a while. I feel so much excitement. It's just a dream come true."

The surprising Athletics were assured no worse than an American League wild card Monday night when Tampa Bay lost to the New York Yankees. A few hours later, Oakland finished off a 7-3 victory over the Seattle Mariners behind Davis' major league-leading 46th home run.

Jonathan Lucroy, Jed Lowrie and Matt Chapman also went deep for the A's.

And then, it was time to party.

Oakland was one out into the game when Tampa Bay was eliminated with a 4-1 loss to the Yankees. The A's went on to win after Chapman broke a 3-all tie with a two-run drive in the seventh off Shawn Armstrong (0-1).

Coming off three straight last-place finishes in the AL West, the A's (95-62) are 4½ games behind AL West-leading Houston. They trail the Yankees by 1½ games for home-field advantage should they meet in a wild-card matchup.

"No matter who we play or where it is, we'll be ready," Chapman said during the celebration. "I can't really put it into words, but this team is special."

Few predicted the A's could make the playoffs this season, a young team with few proven stars after going 75-87 a year ago. Oakland won only 68 games in 2015 and 69 in 2016. The A's have the third-lowest payroll among the 30 major league clubs at $78 million for their 40-man roster, ahead of only the White Sox and Rays.

"This happened for us quicker than most people thought it would," manager Bob Melvin said. "This is the best group I've had in all my years of managing. It's everybody playing for the guy next to him. We really wanted to win this game. Even though we knew we had clinched, we wanted to celebrate right after a win."

Oakland was 34-36 and 11 games behind Seattle in the wild-card race on June 15. The A's have gone 61-26 since.

"We've had some younger players mature and become, for me, stars," Melvin said before the game. "We've gone from last year being one of the worst defenses in the league to now one of the best. Our bullpen has been a strength for us all year. We don't just rely on one facet. We seem to be able to win in different ways."

One big contributor is Davis, the team's designated hitter, with 120 RBIs. Davis has hit at least 40 homers and driven in more than 100 runs in each of this three seasons with the Athletics.

Blake Treinen, who pitched a perfect ninth inning, is 9-2 and one of the top closers in baseball this season with 37 saves and a 0.80 ERA, the lowest of all major league relievers with at least 75 innings pitched. Opponents have a .091 batting average against him with runners in scoring position.

"It's amazing," Melvin said. "Not only is he doing it closing games, he's doing it in games when we're tied and he's pitching two innings at times. The numbers are absolutely fantastic. I don't know that I've seen numbers like that from any closer in quite some time. He's meant a lot to this team."

The A's are the only team in the majors with an undefeated record this season when leading after seven innings (68-0). They have the best record in one-run games at 31-13.

"Oakland is a different team than early in spring, quite a bit different," Seattle manager Scott Servais said. "Certainly they had a number of players step up. That happens throughout baseball as the season goes. Guys get better, and they build confidence."

Oakland made key moves to bolster the pitching staff via trades over the summer by adding veteran relievers Jeurys Familia and Fernando Rodney and starter Mike Fiers, who is 5-1 with a 2.90 ERA since joining the Athletics. Fiers could be the starter in the wild-card game.

"I would love to pitch that game, but whatever this team needs me to do I'm happy to do it," Fiers said. "Anything to get us to the next round. It's been fun to help a winning team like this. They had a plan for me to come in and help this team win and that's what I've been doing."

The A's overcame losing key starters from their rotation down the stretch. That included left-hander Sean Manaea, who pitched a no-hitter on April 21 against Boston and is done for the year recovering from arthroscopic shoulder surgery that took place this past week.

The Athletics will be making their fourth playoff appearance in the last seven seasons, all under Melvin, and their 27th overall. The A's lost at Kansas City 9-8 in 12 innings in the 2014 wild-card game, the last time Oakland reached the postseason.

The last time the A's reached the World Series was 1990, losing in four games to Cincinnati. Oakland won the 1989 World Series after the Bay Area earthquake, sweeping San Francisco.

The Mariners (85-71) have gone 40-46 since June 15, when they were 11 games ahead of the A's.

"Of course it hurts, especially because it was looking so good in the first half," pitcher James Paxton said. "They surged, and we stumbled. It was a heartbreaking way to go for us. None of us are happy about those guys celebrating on our field right now. Hopefully we can get some payback next year."

Robinson Cano and Dee Gordon homered for the Mariners.

TRAINER'S ROOM

Athletics: Starting pitcher Daniel Mengden was on the ground writhing in pain after he took a liner off his right foot that was hit by Denard Span. Mengden was on the ground for about five minutes, but got up and surprisingly stayed in the game. LHP Ryan Buchter (5-0) got two outs, and three more relievers completed a six-hitter.

Mariners: Paxton, making his first start since Sept. 7 after a bout with pneumonia, allowed two runs — both on homers— and three hits. He left after four innings and 71 pitches because he was on a pitch count.

UP NEXT

Athletics: LHP Brett Anderson (4-5, 3.96 ERA) will make his third start Tuesday since coming off the 10-day disabled list on Sept. 13. He is 1-1 with a 3.60 ERA since returning from a strained left forearm.

Mariners: RHP Mike Leake (10-10, 4.10 ERA) will make his 31st start Tuesday. Leake gave up five runs over 6 1/3 innings last time out at Houston, but allowed only one run over 13 innings in his two previous starts.

More From 1460 ESPN