Leodis McKelvin has reached agreement with the Buffalo Bills on a four-year, $20 million contract.

The deal was reached before McKelvin was eligible to become an unrestricted free agent on Tuesday.

McKelvin was the Bills' first round pick in 2008.

McKelvin was used mostly as a third cornerback last season and made a bigger impact on special teams.