OAKLAND, Calif. — After three years of missing the playoffs and dealing away fan favourites like Yoenis Cespedes, Josh Donaldson and Sonny Gray, the Oakland Athletics are trying to steer themselves in the opposite direction.

They certainly took a significant step Saturday by acquiring New York Mets reliever Jeurys Familia to bolster a bullpen that includes All-Star closer Blake Treinen.

"You always want to be in this position where you're potentially adding," A's manager Bob Melvin said. "We've had three years where it's been just the opposite. Three weeks ago, maybe this isn't a conversation. But the way the team's played in the last month put us in a position to be able to do something like this."

New York gets two minor leaguers for its closer, Triple-A right-hander Bobby Wahl and Class A third baseman Will Toffey, and $1 million in international signing bonus pool allotment. Wahl appeared in seven big league games for the A's last year.

"This trade hits three major areas," Mets assistant general manager John Ricco said in a statement. "We got a major league-ready reliever our scouts recommended, a position player who was a high selection from the 2017 draft and strong prospect in the A's system as well as receiving international bonus pool money to help in the future."

Traditionally sellers at the deadline, the A's overcame a slow start and are in the midst of the wild-card picture in the American League. They went into Saturday night's game against the San Francisco Giants having won 21 of 28 since June 16, tied with the Boston Red Sox for the best record in the majors during that stretch.

An All-Star in 2016, Familia was 4-4 with a 2.88 ERA and 17 saves in 21 chances with the Mets this season. The 28-year-old right-hander struck out 43 and walked 14 in 40 appearances covering 40 2/3 innings.

Although the right-hander can become a free agent after this season, the A's didn't shy away from making the move in hopes of enhancing their playoff prospects this year.

There were reports that the two sides were close to a deal late Friday night. Familia was at Yankee Stadium on Saturday morning but left before the start of the Mets' 7-6 loss.

"We thought he was the best guy out there," Oakland general manager David Forst said. "Adding a reliever right now was the best option and we thought Jeurys was the best guy. We've been talking to the Mets for a while, and we're happy that it came together."

The move is a distinct change from what the A's have done in recent years.

In the midst of a playoff run in 2014, executive Billy Beane stunned A's fans when he shipped the popular Cespedes to Boston in exchange for pitcher Jon Lester. It was a move meant to strengthen Oakland's rotation but had mixed results: The A's made it to the playoffs but lost in the wild-card round. Lester was up and down on the mound and signed with the Chicago Cubs as a free agent in the off-season.

Four months after dealing Cespedes away, the A's further angered their fan base when they shipped Donaldson to Toronto.

Last year Gray was dealt to the New York Yankees at the trade deadline, two weeks after relievers Sean Doolittle and Ryan Madson were sent to Washington. The trade with the Nationals netted Treinen.

Now the A's are back in contention — they trailed Seattle by four games for the second wild-card spot heading into Saturday — and looking to add rather than reduce.

"For already having a good bullpen, to be able to bring in an arm like this, man, it's pretty significant," Melvin said. "I'll certainly talk to him before I say how this is going to be deployed as far as what innings for who. But this is a real significant pickup for us. You can't ask for much more."

With the Mets (40-56) languishing near the bottom of the National League standings, Familia and infielder Asdrubal Cabrera were expected to be traded for prospects as the July 31 trade deadline approaches. Cabrera also is eligible for free agency after the season.

Familia saved 43 games in 2015 and the Mets made it to the World Series. He led the majors with a franchise-record 51 saves the following year, again helping New York reach the playoffs.

He had an abbreviated 2017 season due to a blood clot that required surgery, going 2-2 with a 4.38 ERA and six saves in 26 games. He has 123 career saves for the Mets, who signed him at age 17.

To clear a roster spot, the A's transferred right-hander Daniel Gossett to the 60-day disabled list.

___