On the verge of signing with the San Francisco 49ers, free-agent safety J.J. Wilcox changed his mind and is expected to sign with the New York Jets, sources told ESPN's Adam Schefter on Tuesday.

Wilcox's reversal stunned the 49ers. He had agreed to terms on a one-year contract and was meeting with the team's defensive backs coach before practice, sources told Schefter. One source said Wilcox was stricken with "stage fright," while another said the 27-year-old expressed a desire to play for Jets coach Todd Bowles.

Wilcox was expected to fly to New Jersey to sign with the Jets.

The Jets return both starters at safety, promising second-year players Jamal Adams and Marcus Maye, but they see Wilcox as someone who can provide depth and play in three-safety packages. They also like his special-teams prowess.

Wilcox also could be insurance if Maye, who underwent arthroscopic ankle surgery in January, has a setback. Maye isn't participating in OTA practices, but he's expected to be ready for training camp. Backup safety Rontez Miles also has been dealing with an undisclosed injury.

The Jets had been looking for safety depth, as they recently hosted Kenny Vaccaro, who was the New Orleans Saints' first-round pick in 2013, on a free-agent visit.

The Pittsburgh Steelers released Wilcox on April 30, days after selecting two safeties in the NFL draft.

Wilcox was acquired by the Steelers in a trade last year with the Tampa Bay Buccaneers, who had signed him as a free agent. In his only season in Pittsburgh, Wilcox appeared in 12 games (one start) and finished with 12 tackles, one interception and one pass defensed.

Wilcox struggled to break into the lineup behind veteran Mike Mitchell, who was released in March, and second-year safety Sean Davis. He also didn't carve out a reliable role on special teams.

He spent his first four seasons with the Dallas Cowboys, playing in 58 games (38 starts) and recording 214 tackles, five interceptions, 15 passes defensed and two forced fumbles.