Paul Millsap is staying in Atlanta.

The two-time All-Star power forward agreed to a three-year, $59 million contract as an unrestricted free agent to remain with the Hawks Wednesday, according to multiple sources. The third year is a player option for Millsap, meaning he could elect to become a free agent again in the summer of 2017.

Millsap weighed a similar deal from the Magic after meeting with team officials at 12:01 a.m. Wednesday, the start of the NBA free agency period. In the end, he decided to remain with the Hawks, who he credits with elevating his career.

Millsap will make $18.8 million next season, $19.646 million in 2016-17 and $20.492 in his option year of 2017-18 for a total salary of $58.938 million.

Millsap cannot sign the deal until July 9, the end of the league moratorium on free agent signings.

Millsap acknowledged the agreement on social media Wednesday night on Twitter. “Blessed and Excited to be back with the @ATLHawks!!! Great things ahead. Thank you all for your support,” he posted.

According to one person familiar with the negotiations, both sides worked collaboratively to find common ground in working out the details of the new contract.

Millsap is expected to remain at power forward even though the Hawks traded for Spurs’ forward/center Tiago Splitter Wednesday. Such a move was not discussed as part of the negotiations and not anticipated. However, Millsap is open to playing where needed. He did play some small forward with the Hawks at times last season.