The 49ers have locked up nickel back K’Waun Williams to a three-year contract extension through the 2020 season, the club announced on Friday morning.

“Since joining us this offseason, K’Waun has displayed every trait and characteristic we want to see from our players,” 49ers general manager John Lynch said in a statement.

“He is a tremendous competitor on the field and a true professional in our building. K’Waun has continued to get better and better every day and we wanted to ensure he would be a part of what we are building moving forward. I am really excited for both him and our team.”

Williams' three-year extension is worth $10 million, $5 million of which is guaranteed, the NFL Network reported, citing a source. The deal also includes incentives.

Through three games, Williams has recorded 14 tackles and broken up two passes while primarily covering the slot receiver in the 49ers' nickel defense.

Williams, 26, was signed to a one-year contract in the offseason after spending time with 49ers defensive backs coach Jeff Hafley at the Cleveland Browns. Hafley said he considered Williams one of the top nickel backs in the NFL.

The Brown signed Williams as an undrafted free agent from Pittsburgh in 2014. Williams (5 foot 9, 183 pounds) played in 26 games in his first two seasons with 10 starts.

Williams fell out of favor in Cleveland due to a dispute about an ankle injury and his availability to practice. The Browns waived Williams before the start of the 2016 season. The Chicago Bears claimed Williams off waivers but he failed a physical. Williams did not see action last season due to bone spurs in his ankle.

Williams signed a one-year, $690,000 contract with the 49ers that contained a $75,000 signing bonus. He can also make $250,000 in incentives. Terms of his new deal were not immediately known.