SANTA CLARA, Calif. -- Since coach Kyle Shanahan and general manager John Lynch arrived in 2017, the San Francisco 49ers have made a habit of devoting resources to their defensive line. They did it again Friday when they reached a trade with the Denver Broncos that will bring edge rusher Randy Gregory to the Bay Area.
The 49ers and Broncos agreed to send Gregory and a 2024 seventh-round pick to San Francisco for a 2024 sixth-round pick, sources told ESPN's Adam Schefter.
Shanahan said he met with Gregory on Friday when the pass-rusher came in for his physical and added that Gregory will rejoin the 49ers on Monday.
"Being able to add a guy like that, we feel he'll make our team better, so we didn't hesitate to do it," Shanahan said.
The Broncos will pay Gregory roughly $10 million for the rest of the season while the 49ers will pay him the veteran minimum for that time, sources said. Gregory, 30, has three seasons left on the five-year, $70 million contract he signed with the Broncos in March 2022, but none of it is guaranteed beyond 2023.
The deal came together after a week of discussion centered on Gregory's future with the Broncos. Gregory had not been present at Denver's practice facility after he and his representatives asked for a release earlier in the week, sources told ESPN.
Broncos coach Sean Payton had acknowledged Wednesday that a move with Gregory was coming and said moving on from him was "something we felt was just best for our team right now timing-wise," while leaving open the possibility of a team showing interest in a trade.
Gregory was pulled from the starting lineup against the Chicago Bears last week with outside linebacker Nik Bonitto stepping in. Gregory played 33 snaps against the Bears, finishing with three tackles and a quarterback hit. In four games this season, he has nine tackles and one sack.
"I love Randy as a player, but it's a production business and it's a team decision," Broncos defensive coordinator Vance Joseph said. "Obviously, Randy's a good football player, but sometimes it's not a good fit. It's about fit in this league, and it was not a good fit for us."
For the 49ers, Gregory will add to a defensive line that includes end Nick Bosa and tackles Javon Hargrave and Arik Armstead. San Francisco has been seeking a complement to Bosa after the offseason departures of Samson Ebukam and Charles Omenihu in free agency. Gregory will probably have the opportunity to work opposite Bosa on third down and obvious passing situations.
Through the first four weeks, 49ers defensive ends have combined for just four sacks, three of which came from Drake Jackson in the opening week.
Over nine seasons with the Dallas Cowboys and Broncos, Gregory has 19.5 sacks and 81 pressures. He has never played a full season because of injuries and lost 54 games to suspensions for violating the NFL's substance abuse policy.
Gregory's best season was 2018, when he played a career-high 14 games and posted six sacks.
Information from ESPN's Jeff Legwold was used in this report.