The Las Vegas Raiders signed free agent cornerback Casey Hayward to a one-year deal, adding needed experience to a young secondary that has struggled in recent years.

The deal announced Tuesday reunites Hayward with defensive coordinator Gus Bradley. Hayward had been linked to the Raiders ever since being released by the Chargers in March.

A person familiar with the deal says Hayward can earn up to $4 million in 2021. The person spoke on condition of anonymity because terms of the deal weren’t released.

Bradley had been the defensive coordinator for the Chargers the previous four seasons and was hoping to bring a cornerback familiar with his system with him to his new job in Las Vegas.

The 31-year-old Hayward has been one of the better cornerbacks in the league over his nine seasons with Green Bay and the Chargers. The former second-round pick out of Vanderbilt made the Pro Bowl in his first two seasons with the Chargers in 2016-17 when he led the NFL with 42 pass breakups and was tied for the NFL lead with 11 interceptions.

His production dropped a bit in recent years and he allowed 8.6 yards per target last season, according to SportsInfo Solutions, for his worst mark in five seasons with the Chargers. The Raiders hope he can regain his old form and bring a steadying influence to a young secondary.

The Raiders had been projected to start players taken in the past three drafts with cornerbacks Trayvon Mullen, Damon Arnette and Amik Robertson in the slot and safeties Johnathan Abram and 2021 second-round pick Trevon Moehrig.

Arnette struggled as a rookie last season after being drafted in the first round and Hayward provides an option to start outside at cornerback if Arnette doesn’t improve or moves into the slot.

Since coach Jon Gruden returned in 2018, the Raiders have ranked last in the NFL in points allowed (28.4 per game) and second worst in yards per play allowed (6.05) with issues in the secondary being paramount.

Safety Jeff Heath is expected to be released by the Raiders this week. Heath, who turns 30 this month, was the AFC Defensive Player of the Week in Week 10 last season when he made two interceptions in a 37-12 win over the Broncos in November. Heath would become a free agent.