The Indianapolis Colts are giving cornerback Stephon Gilmore a two-year, $23 million contract that includes $14 million guaranteed, a source told ESPN’s Adam Schefter.

Gilmore becomes the second veteran addition to the Colts’ secondary this week, after Indianapolis signed safety Rodney McLeod on Thursday.

Cornerback was a position of need for the Colts after they traded starter Rock Ya-Sin to the Las Vegas Raiders for pass-rusher Yannick Ngakoue and did not re-sign starter Xavier Rhodes.

The Colts have reshaped their defense after the departure of coordinator Matt Eberflus, who is now the head coach in Chicago, and hired Gus Bradley as his replacement.

Indianapolis’ defense now features the five-time Pro Bowler Gilmore, Ngakoue and DeForest Buckner on the line, linebacker Darius Leonard, and one of the league’s best slot corners in Kenny Moore. All five of those players have been selected to at least one Pro Bowl in their careers.

Gilmore played the 2021 season with the Carolina Panthers, who traded a 2023 third-round pick to the New England Patriots in October to get him. The Panthers added the 2019 NFL Defensive Player of the Year in hopes that he could replace first-round pick Jaycee Horn, who suffered a season-ending foot injury in Week 3 at the Houston Texans.

Gilmore, 31, was on the physically unable to perform list when he arrived in Carolina, still recovering from offseason surgery on a torn quad and not eligible to return until Week 6. He was activated in Week 8 and played the final eight games, starting three. He had an interception in his Carolina debut at Atlanta to preserve a 19-13 victory then followed that with another in his home debut against New England. After the season, he was added to the Pro Bowl as an alternate.

He said after the trade that he did not appreciate the way New England handled his quad injury, suffered in Week 15 of the 2020 season.

Gilmore, who grew up in Rock Hill, South Carolina, had told ESPN before a late-season game at Buffalo that he would like to return to Carolina. The Panthers liked the veteran leadership brought to a young Carolina secondary. Complicating the issue was 2018 second-round pick Donte Jackson, 26, who re-signed with the Panthers on a three-year deal last month.

The 10th overall pick in the 2012 draft by the Bills, Gilmore has 27 interceptions and 116 passes defended in 10 seasons.

ESPN’s Mike Wells and David Newton contributed to this report.