The Buffalo Bills moved quickly Friday to thin their crowded wide receiving corps.

The San Francisco 49ers acquired receiver Stevie Johnson for a conditional 2015 fourth-round pick that could become a third-rounder, a source told NFL Media Insider Ian Rapoport.

ESPN first reported the news of the trade, and the Bills later confirmed the deal along with the Niners.

Johnson is a good fit in San Francisco, which was searching for a third receiver to complement Michael Crabtree and Anquan Boldin. While Johnson doesn't have the blazing speed general manager Trent Baalke was looking for, his ability to run option routes should be a boon for quarterback Colin Kaepernick.

"Stevie was a great contributor during his career with our organization," Bills GM Doug Whaley said in a release. "Today's decision was not an easy one to make, especially involving a player like Stevie who leaves everything he has on the field and is an emotional leader in our locker room."

The Bills clearly wanted Johnson out of the building. They paid him a $1.75 million roster bonus in March, and he will count $10.225 million against their salary cap this year, per Brian McIntyre.

The price was good for the 49ers, who gave up at most a third-round pick for a receiver with three 1,000-yard seasons from 2010 to 2012. Johnson does have some injury concerns, but at 27 years old and on a decent contract, he was worth the gamble for the 49ers.

Johnson plays similarly to Crabtree and Boldin as a physical possession receiver who isn't a great vertical threat. However, he is an elusive route runner who gives cornerbacks fits, especially on option routes.

Much of his reduction in stats last season could be attributed to the Bills' struggles at quarterback.

If he can find a rapport with Kaepernick, Johnson could be a solid No. 2 receiver for the 49ers -- something any team would love to get out of a third-round pick.