Carmelo Anthony has reached a deal to remain with the New York Knicks.

The team announced Sunday that it had re-signed Anthony, but did not disclose terms.

The contract will be for more than $122 million but less than the five-year, $129 million max figure, a source told ESPN The Magazine's Chris Broussard on Saturday.

"After three months of questions around Carmelo Anthony's return to the New York Knicks we are now happy to know that we have the cornerstone of what we envision as a 'team of excellence,'" Knicks president Phil Jackson said in a statement. "... [Knicks general manager] Steve Mills and I have assured Carmelo through our conversations, that we share the vision and the determination to build this team."

Jackson added later Sunday that Anthony had taken less than the maximum to give the Knicks cap flexibility.

"He did exactly what we kind of asked him to do. Give us a break in the early part of his contract so that when we have some wiggle room next year, which is hopefully big enough wiggle room, we can exploit it, provide a more competitive team for our group," Jackson said after the Knicks' summer league practice in Las Vegas.

Anthony and the Knicks had been in the final stages of negotiations since Saturday.

Anthony also announced the deal via his personal website on Sunday afternoon.

"A few years ago I dreamed of coming back to New York City, the place of my birth, and on February 23, 2011 that became a reality," Anthony said in a statement. "This organization has supported me and in return, I want to stay and build here with this city and my team. At this pivotal juncture in my career, I owed it to myself and my family to explore all of the options available to me. Through it all, my heart never wavered."

All-Star forward Carmelo Anthony has reached a deal to return to the New York Knicks. Jim McIsaac/Getty Images

Anthony was being courted by the Knicks, Chicago Bulls, Dallas Mavericks, Houston Rockets and Los Angeles Lakers. He met with each team last week.

He was choosing between the Knicks and Bulls as recently as Friday, according to sources.

"I will always remember this chapter in my life. In the end, I am a New York Knick at heart," he said in the statement. "I am looking forward to continue my career in Orange & Blue and to work with Phil Jackson, a champion who builds championship teams. Madison Square Garden is the mecca of basketball and I am surrounded by the greatest fans in the world."

First-year Knicks coach Derek Fisher said he was thrilled to have the chance to coach Anthony, a seven-time All-Star.