MIAMI — A person familiar with the negotiations says Andre Iguodala is headed to Miami after the Heat and Memphis Grizzlies agreed Wednesday night on his long-awaited trade.

As part of the deal, Iguodala agreed to a two-year extension, with the second of those years being a team option, according to the person who spoke to The Associated Press on condition of anonymity because the trade has not been finalized.

The person also said Miami and Memphis were still working to complete terms of what the Heat are giving up in the deal, and that a third team — Oklahoma City, in a package that would include Danilo Gallinari potentially headed to the Heat — was still in play. Oft-injured forward Justise Winslow said he was part of the deal and was headed to Memphis, the former Heat starter reaching out to fellow former Duke players Tyus Jones and Grayson Allen with a message.

Jones and Allen are both members of the Grizzlies. Winslow has missed much of this season with a bone bruise in his back.

Iguodala, speaking to The Undefeated, said he was eager to play alongside Jimmy Butler and Miami's young core — saying he looked forward to helping mentor them as well.

Jimmy Butler ... he's looked at as different but (is) very well-respected in terms of the passion and the hard work that he brings to the game," Iguodala said. “I feel like his temperament and values that he has really resonates with the Miami Heat. They're very well aligned. I think he's brought out the best in those young guys."

Iguodala specifically mentioned Heat centre Bam Adebayo, a first-time All-Star this year.

“Bam, I'm really looking forward to playing with him," Iguodala said.

Holding the team option for 2021-22 is a critical component for Miami, which intends to have maximum flexibility for free-agent shopping in the summer of 2021 and made clear to all teams in recent days — and even last summer — that it would not compromise those plans.

The 36-year-old Iguodala was the 2015 NBA Finals MVP for Golden State and was traded to Memphis last summer. He did not play for the Grizzlies, after he and the team agreed that it would be best if he was sent elsewhere. It took several months, but Miami became that destination.

The Heat went into the trade deadline prioritizing perimeter defensive help, which made Iguodala a perfect fit. It was not immediately clear when he would join the Heat, which was starting a five-game trip in Los Angeles against the Clippers on Wednesday.

Jae Crowder and Solomon Hill were both held out of Memphis’ win over Dallas because they were likely to be involved in the pending trade — presumably as parts that would enter the fray once the third team was added. Grizzlies coach Taylor Jenkins, without commenting specifically on the still-not-completed transaction, said Crowder and Hill “really helped build something great here in Memphis.”

Grizzlies guard Dillon Brooks, who said earlier this week that he was looking forward to playing against Iguodala one day “and show him really what Memphis is about,” said he was eager to play with Winslow.

“We’re getting a good player,” Brooks said.

Miami would be the fourth team that Iguodala has suited up for — joining Philadelphia, Denver and Golden State. He has averaged 12.1 points in 1,108 career games, plus is a veteran of 145 playoff contests and was with the Warriors for all five of their NBA Finals runs over the last half-decade.

He's a three-time champion and two-time All-Defensive team member, and getting him is a clear sign that the Heat are expecting to be a post-season contender.

“Excited to get back out there," Iguodala said.

___

More AP NBA: https://apnews.com/NBA and https://twitter.com/AP_Sports