PITTSBURGH (AP) — Looking to fortify their bullpen for the stretch run, the New York Yankees agreed to acquire two-time All-Star closer David Bednar from the Pittsburgh Pirates a few hours ahead of baseball's trade deadline Thursday.

New York was set to send three minor league prospects to the last-place Pirates in exchange for Bednar, a person with knowledge of the deal told The Associated Press. The person spoke to the AP on condition of anonymity because the trade was pending a review of medical information and had not been announced.

Pittsburgh would receive catcher and first baseman Rafael Flores, catcher Edgleen Perez and outfielder Brian Sanchez.

Not done, the Yankees also finalized a trade to obtain right-handed reliever Jake Bird from the Colorado Rockies for two minor leaguers: infielder Roc Riggio and left-hander Ben Shields.

Bird is 4-1 with a 4.73 ERA in 45 appearances this season.

The Yankees had been seeking late-inning options for their bullpen, which entered Thursday with a 4.24 ERA — including a 6.27 mark in July.

Devin Williams began the season as the closer but struggled in the first month and temporarily lost the job to Luke Weaver. Williams started pitching better and regained the ninth-inning role — but Weaver has struggled since returning from a hamstring injury that sidelined him for three weeks in June.

Working mostly in a setup role, the right-hander has a 6.60 ERA since coming off the injured list and has allowed five homers in 15 appearances. He is 2-3 with a 3.10 ERA and eight saves in 39 games overall.

The burly Bednar had problems of his own earlier this season. He spent three weeks at Triple-A Indianapolis in April following a rocky start.

The time in the minors worked wonders. The 30-year-old Bednar has been dominant since his return and had a streak of 23 straight appearances without allowing an earned run end in San Francisco on Monday, though he held on to pick up his 17th save.

The Pittsburgh-area native — who came to his hometown club as part of the massive three-team deal that sent pitcher Joe Musgrove to San Diego — has evolved from a 35th-round draft pick by the Padres in 2016 into a two-time All-Star thanks in part to a fastball that can touch the upper-90s mph and a fiery competitiveness that helped him thrive at the back end of the bullpen for a team in need of stars.

The 6-foot-1, 250-pound Bednar, who takes the mound to the Styx classic “Renegade” — a nod to the NFL’s Pittsburgh Steelers, who have long played the song during pivotal late-game defensive possessions — led the National League with 39 saves in 2023, locking down more than half of Pittsburgh’s 76 victories that season.

He took a significant step back in 2024, when he posted a career-high 5.77 ERA and lost his job to veteran flamethrower Aroldis Chapman.

The problems carried over into this spring, though that now looks like a blip. Bednar’s hard work — and Pittsburgh’s spot at the bottom of the NL Central — made him a valuable commodity at the deadline and now he will find himself in the middle of a playoff race for the first time in his seven-year career.

New York began the day four games behind first-place Toronto in the AL East.

It was the fourth trade made by the Yankees since last Friday. They obtained third baseman Ryan McMahon from Colorado on Friday, reserve infielder Amed Rosario from Washington on Saturday and reserve outfielder Austin Slater from the Chicago White Sox on Wednesday.

Pittsburgh sent third baseman Ke’Bryan Hayes to Cincinnati on Wednesday. A day later, the club sent one of its most popular players to New York in hopes that Flores can evolve into the kind of impactful bat the worst offense in the majors desperately needs.

The 24-year-old Flores was hitting .279 with 16 home runs and 60 RBIs in 97 games combined at Double-A and Triple-A.

___

AP Sports Writer Pat Graham in Denver, and AP Baseball Writer Mike Fitzpatrick and AP freelance reporter Larry Fleisher in New York contributed to this report.

___

AP MLB: https://apnews.com/MLB

Featured

About 4,300 graduating Emory students wait for the commencement ceremony to begin on May 8, 2023. The school is expecting to see a multimillion-dollar increase on its endowment tax liability after recent legislation. (Miguel Martinez/AJC)

Credit: TNS