Just when you thought it was safe to be a Knicks fan again, team owner James Dolan proves otherwise.

Donnie Walsh is out as president and general manager of the New York Knicks.

"Following a long series of discussions regarding his future role with the New York Knicks, Donnie Walsh and I have mutually agreed that he will be leaving his position at the end of June," Dolan said in a statement.

This comes just four weeks before his contract was due to expire.  Now that Walsh is out, there are questions about whether head coach Mike D'Antoni will be back for the final year of his contract.

Walsh signed with the Knicks back in 2008 and took over as President and General Manager for Isiah Thomas - who made a series of horrific moves that made the Knicks organization a laughingstock around the NBA.

Most thought that Walsh and Dolan would agree on a new contract through the 2012-13 season. But Walsh wanted to have total say over player moves which is believed to be a reason for his departure.

During the first two years at the Knicks helm, Walsh essentially gutted the roster to clear enough salary cap space to sign two maximum-salary free agents in the summer of 2010.  LeBron James was their top target but when LeBron chose Miami instead of Manhattan, the Knicks signed Amare Stoudemire in July.  A few months later, they traded away 6 players and several draft picks to the Denver Nuggets for Carmelo Anthony. 

But that trade might have signaled the beginning of the end for Walsh.  Dolan was rumored to take over the negotiations despite Walsh's opposition to make the mega-deal.

The search for a new president and general manager will begin immediately. Glen Grunwald, the club's senior vice president of basketball operations, will serve as interim GM and will oversee all player transactions.