Los Angeles Clippers forward Maurice Harkless, left, shoots as Miami Heat forward Bam Adebayo defends during the first half of an NBA basketball game Wednesday, Feb. 5, 2020, in Los Angeles. (AP Photo/Mark J. Terrill)

MIAMI (AP) — 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 while 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 resonated with the Miami Heat. They’re very well aligned. I think he’s brought out the best in those young guys.”

Butler cited Iguodala’s reputation as a winner in what he brings to a team.

“He’s super-smart. There’s nothing that he cannot do,” Butler said. “When I get to learn from him when everyone gets to learn from him, that winning level, that meter, is going up in everyone’s mind.”

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

“Bam, I’m really looking forward to playing with him,” Iguodala said.

Adebayo feels the same way about Iguodala and values his playoff experience.

“He’s been there a lot of times, so you know he’s going to bring a lot of knowledge,” Adebayo 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.

“He won, what, three championship rings?” Heat guard Goran Dragic said. “Happy to have him. Can’t wait to pick his brain. He’s going to do great things for us.”

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 began a five-game trip in Los Angeles with a 128-111 loss to the Clippers on Wednesday night.

“He’s another person like Jimmy that I could lean on because he knows the ropes and knows everything on the defensive end,” said Derrick Jones Jr., who had 25 points against the Clippers. “He’s one of those people that I could pick his brain on the defensive end. He has a very high IQ.”

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 postseason contender.

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