Donnie Walsh will not return as president of the New York Knicks, who must find someone else to continue the building job he started.

The Knicks announced in a statement Friday that Walsh and Madison Square Garden chairman James Dolan mutually agreed that Walsh will not return when his contract expires at the end of June.

Walsh's departure is a major loss for the Knicks and opens questions about whether coach Mike D'Antoni will return for the final year of his contract.

Walsh spent three seasons in New York, leading a massive rebuilding effort that got the team back into the playoffs this season following the acquisitions of Amare Stoudemire and Carmelo Anthony.

But Dolan didn't pick up his option for next season, and the two couldn't agree on terms of an extension.

"In a relatively short time with the Knicks, Donnie made a tremendous impact, which will be felt for many years to come," Dolan said. "We thank Donnie for his leadership, hard work and many contributions to the revitalization of the team."

The Knicks said Walsh will be a consultant next season. Senior vice president Glen Grunwald will serve as interim general manager.

Walsh and D'Antoni arrived in New York following the 2007-08 season and immediately went to work cleaning up the mess left by Isiah Thomas, who had served in both roles. For Walsh, that meant spending two seasons reducing one of the league's highest payrolls, getting the Knicks far enough under the salary cap to afford two top players last summer.

The Knicks got only Stoudemire but traded for Anthony in February and finished 42-40, their first winning record in a decade. They were swept by Boston in their first postseason since 2004, and the roster needs significant upgrades to compete with the top teams in the Eastern Conference.

Walsh had said he wanted to return, but he has battled health problems and didn't appear to have complete basketball control, with Dolan still relying on the advice of Thomas even after Walsh fired him.

"With some of the NBA's premier players, an outstanding coach and one of the league's most passionate and loyal fan bases, we are extremely confident about the future of the Knicks franchise," Dolan said.