Updated

MIAMI (AP) Udonis Haslem is coming back for a 14th season in Miami, Tyler Johnson's move to Brooklyn is cancelled and a Heat roster that had plenty of holes a few days ago suddenly seems revamped.

Haslem signed a one-year deal worth $4 million - significantly more than he originally expected - on Sunday, the same day that Miami decided to match a $50 million, four-year offer sheet that Johnson received from the Nets.

''UD is happy,'' Haslem's agent Henry Thomas said, ''and so am I.''

A person with direct knowledge of the situation confirmed the decision about Johnson, which was first reported by Yahoo Sports, to The Associated Press.

It was a hectic Sunday for the Heat, who struck or completed deals with no fewer than six players. Shooting guard Wayne Ellington ($12 million for two years, second year unguaranteed) and forward James Johnson ($4 million for one year) signed their contracts. And the deal with forward Derrick Williams ($5 million for one year, terms of which were agreed upon late last week) became finalized as well.

Later Sunday, the Heat acquired forward Luke Babbitt from New Orleans, giving the Pelicans cash considerations and returning their 2018 second-round pick that Miami got in a separate deal with them last season. And then came the big decision, that being the one that will keep Tyler Johnson in Miami on a deal that will pay him about $6 million in each of the next two years - then about $19 million in each of the following two years.

Tyler Johnson has appeared in 68 games for Miami over his first two NBA seasons, and the Heat are obviously sold on his potential.

Haslem has long been a locker-room leader, particularly vital in the development of center Hassan Whiteside - and maybe even more vital now with Dwyane Wade leaving Miami for Chicago. Haslem barely played last season, averaging 1.6 points in extremely limited action spanning 37 games. But Heat President Pat Riley said when the season ended that Miami had no plans on letting Haslem leave, and followed through on that Sunday.

On Twitter, Wade offered Haslem - a Miami native - congratulations on the new deal.

''Way to continue holding it down for your city,'' Wade wrote.

The Heat become Ellington's seventh team in eight seasons. The shooting guard won an NCAA title at North Carolina and was Most Outstanding Player of the Final Four in 2009. He spent his first three years in Minnesota and has been on the move just about annually since, playing for Memphis, Cleveland, Dallas, the Los Angeles Lakers and most recently Brooklyn.

Ellington has four games of 25 or more points in his career, two of those coming against Miami. And his career best for 3-pointers in a game is seven, done twice - both times against Miami, first in 2012 when he was with the Grizzlies and again last December while with Brooklyn.

''I'm super excited to be a part of a first class organization! Let's get to work and make it a great season!!!,'' Ellington wrote on Instagram.

James Johnson, a 6-foot-9 power forward, averaged 5.0 points and 2.2 rebounds in about 16 minutes for Toronto last season. Babbitt gives Miami shooting depth as someone who has made just over 50 percent of his 3-pointers in the last two seasons, going 113 for 224 from long-range in that span.

With Wade leaving, it has been a summer of transition for the Heat. Miami has already re-signed Whiteside to a $98 million, four-year deal during this free-agency period. The Heat also signed guard Rodney McGruder to a partially guaranteed three-year contract last week.