The San Francisco 49ers nearly completed a deal to acquire cornerback Aqib Talib from the Denver Broncos the week before the start of free agency. The terms of the trade had been agreed upon by both teams at the combine, 49ers general manager John Lynch told 710 ESPN in Seattle on Wednesday. That deal fell apart in the end, and just days later, another high-profile cornerback fell into their laps.

The Seattle Seahawks released Richard Sherman on March 9. The next day, he was in Lynch's office signing a contract to join the 49ers. Talib may have been San Francisco's first choice, but the 49ers believe they got their top choice.

Lynch joined Golic and Wingo on ESPN Radio on Wednesday morning and walked Mike Golic and Trey Wingo through the process of trying to acquire Talib and then ending up with Sherman.

"I think about a week prior, we had agreed to a trade for Aqib Talib, and that didn't work out," Lynch said. "It's not that he didn't want to be a Niner. Kyle and I actually, with permission from (John) Elway, got on the phone with Aqib, and he didn't like the whole idea of getting traded, not having control over the situation. If he was traded, he wanted to play for a couple of people that he knew real well – (Bill) Belichick or Wade Phillips.

"We talked to him and got him excited about the Niners but ultimately, he wanted to back up the Brinks truck in, and it wasn't making sense. So we moved on."

The Broncos ended up trading Talib to the division-rival Los Angeles Rams, who had already acquired cornerback Marcus Peters from the Kansas City Chiefs. Does Lynch regret that Talib ended up with another NFC West team and now his 49ers will have to face him twice a year?

RELATED John Lynch: Kyle Shanahan's master plan was to acquire Kirk Cousins; Jimmy Garoppolo had to prove himself

"Aqib's a pretty head-strong guy, and I've got a lot of respect for him," Lynch said. "I still do. As much as we tried to change his mind, he was pretty firm with what he wanted. At some point, we want people that really want to be a part of us, and I think we could have played hardball and had him just sit there and all those things. But at that point, it didn't make sense, and we said, 'Hey, we've got to move on from this.'

"We handed it back over to John and said, 'Go figure out something. Take him back out to the market.'"

Lynch said he's a believer that things happen for a reason and feels failing to acquire Talib led to an even better opportunity with Sherman. Within minutes of being released by the Seahawks, the 49ers had Sherman, who was in Las Vegas at the time, on the phone and wanted him to fly in for a visit.

Sherman arrived in the Bay Area later that night. He and his fiancée, Ashley, and had dinner with 49ers head coach Kyle Shanahan and his wife.

"Kyle had some questions he wanted to go over with him," Lynch said. "He wanted to get to know the guy. I had known Richard for years back to his Stanford days."

Following the dinner, Shanahan gave the union between the 49ers and Sherman his blessing. Lynch, who was in San Diego for his daughter's birthday, flew up the next morning to meet with the All-Pro cornerback.

RELATED John Lynch says Reuben Foster is working on improving himself

Sherman and Ashley met with Lynch and the 49ers' chief contract negotiator, Paraag Marathe, in Lynch's office at the team's facility to try to get a deal done. Once Sherman stated he wanted to join the 49ers, Lynch and Marathe left the office to put together a contract proposal. Sherman represented himself during the negotiations, which has drawn some criticism.

"We felt like he did a great job representing himself," Lynch said. "His [fiancée] Ashley, a pretty darn good agent too. At one point we were stuck, and she came up with a great comment to move the thing forward.

"I was kind of in there. I usually let Paraag handle most of these things. I'll get involved in the beginning and the end. I felt like I was the bouncer because I thought Richard might reach across the room and choke Paraag out if I weren't in the room.

"It was pretty smooth. Every now and then, he'd go out on the balcony, and he was talking to some other teams, and then we would leave. Five hours later, we came to an agreement."

One of those other teams was the Seahawks, who had asked Sherman to allow them the opportunity to match any potential deal. Seattle couldn't match what the 49ers were offering him, nor could the Detroit Lions, who Sherman also called.

"There were three times where he said, 'Hey, I think I'm just going to go sleep on this,'" Lynch continued. "I said, 'Richard, we're this close ... Let's get this thing done.'"

Now, the 49ers have a seven-year veteran cornerback on their roster and a leader for the young defense.