Andre Iguodala #9 of the Denver Nuggets posts up against Randy Foye #8 of the Utah Jazz at Energy Solutions Arena on April 3, 2013 in Salt Lake City. (Photo by Melissa Majchrzak/NBAE via Getty Images)

OAKLAND, Calif. (AP) – The Denver Nuggets will get something back for Andre Iguodala after all.

The Nuggets have agreed to separate sign-and-trade deals that will land them guard Randy Foye from the Utah Jazz and send Iguodala to the Golden State Warriors, a person familiar with the decision said Monday.

The Warriors had planned to sign Iguodala to a four-year, $48 million deal as a free agent last week. Instead, the restructured deal will give Golden State more salary cap flexibility, deliver Denver a $9 million trade exception and help Utah build for the future with expiring contracts and draft picks.

The person, who spoke on condition of anonymity to The Associated Press on Monday because teams are not allowed to confirm moves until the new league year begins Wednesday, said the original Warriors-Jazz deal remains intact.

The Warriors will clear more than $24 million by sending Richard Jefferson, Andris Biedrins and Brandon Rush to the Jazz along with the package of draft picks. All three are in the last year of their deals.

Golden State is only taking back Kevin Murphy and his non-guaranteed $788,000 deal from Utah.

Yahoo Sports, which first reported the new deal, said Foye will sign a three-year contract worth $9 million. Utah will receive multiple draft picks from Golden State, including its 2014 and 2017 first-round picks.

By signing Iguodala first and then sending him to the Warriors, Denver will get a trade exception worth about $9 million that it can use anytime within the next year. And in the meantime, it softens the blow left by Iguodala’s departure.

The Warriors will also get some roster flexibility to sign other free agents through other exceptions in the NBA’s complicated salary cap system.

The 6-foot-4, 213-pound Foye, who will turn 30 on Sept. 24, is primarily an off-guard but can also play point guard. He averaged 10.8 points and two assists while playing all 82 games for the Jazz last season.

Foye has shot 40.9 percent for his career, including 37.7 percent from 3-point range. He was drafted seventh overall out Villanova in 2006 by the Boston Celtics, who immediately traded him to Portland, which moved him to Minnesota.

Foye’s best season came with the Timberwolves in 2008-09, when he averaged 16.3 points, 4.3 assists and 3.1 rebounds per game. He played three seasons in Minnesota, one with the Washington Wizards and two for the Los Angeles Clippers before going to the Jazz last year.