1 of 3
TNT commentator and former Chicago Bulls and San Antonio Spurs guard Steve Kerr broadcasts courtside for Game 4 of an NBA basketball first-round playoff series between the Toronto Raptors and the Brooklyn Nets at the Barclays Center, Sunday, April 27, 2014, in New York. New York Knicks President Phil Jackson told reporters he interviewed Kerr for the vacant New York Knicks coaching position. (AP Photo/Kathy Willens)

Steve Kerr stunned the New York Knicks on Wednesday by agreeing to a deal to become the coach of the Golden State Warriors.

Phil Jackson, the Knicks’ new president, had been pursuing Kerr for weeks to fill the vacancy left by Mike Woodson, whom Jackson fired last month. Jackson and Kerr have a relationship dating to their time together with the Chicago Bulls, with whom Kerr won three championships as a player.

But in recent days Kerr was wooed by the Warriors, who needed to replace the recently dismissed Mark Jackson, and Kerr confirmed in a text message that he had taken their job. His contract is for five years.

The Warriors are a more talented team than the Knicks, with a solid core of young players like Stephen Curry. As such, Golden State could be the more promising place for Kerr to begin his coaching career.

But there were other factors, too. Kerr lives in San Diego, and his children go to school in California. His daughter, Madeleine, attends University of California, Berkeley, near the Warriors’ practice complex.

The Knicks also have a reputation for operating as something less than a beacon of stability under the owner James L. Dolan. When Jackson joined the Knicks in March amid a disastrous season that left the team short of the playoffs, he sought assurances from Dolan that he would have full autonomy to run the Knicks’ basketball operations. Whether that was the case throughout Jackson’s pursuit of Kerr was not clear.

Jackson will need to turn to Plan B — whatever that may be. Kerr was his first choice, but there is no shortage of viable candidates.

Jackson had said from the start of his search that he would prefer to hire someone acutely familiar with the triangle offense. Jackson is the triangle’s most unabashed and highest-profile advocate, and he used it to great effect, winning 11 titles as the coach of the Bulls and the Los Angeles Lakers.

So Jackson began to court Kerr almost immediately, leaving little doubt that Kerr was his top choice.

“We meet very similar space about coaching in a lot of ways,” Jackson said last month.

They dined together in New York on April 25 and met again the next day. Kerr, who was on assignment that weekend with Turner Sports to help broadcast a playoff game between the Brooklyn Nets and the Toronto Raptors, said he was doing his due diligence.

“There’s a lot to discuss on both sides,” Kerr said. “It’s a big job. It’s important on both sides that we cover all the bases.”

Kerr must have known that the job would be fraught with challenges, especially in the short term. Carmelo Anthony, the team’s best player, plans to test free agency this summer. Regardless of Anthony’s plans, the Knicks will be flush against the salary cap until the summer of 2015, and Jackson will be limited in his ability to make meaningful personnel moves until then.

In addition, coaching the Knicks has not exactly been the most secure occupation in recent years. The person Jackson winds up hiring will be the team’s eighth head coach since 2003.

The Knicks had been stuck in a bit of a holding pattern while awaiting Kerr’s decision. He has a reputation for being rigorous and methodical, as a man who does his research. He likes to evaluate his options. Several were available to him, even if the lure of rejoining Jackson, whom Kerr considers a mentor, was strong. So the Knicks waited, and waited some more.

In the meantime, the NBA was busy. Kevin Durant collected his first Most Valuable Player trophy while guiding the Oklahoma City Thunder to the cusp of the Western Conference finals. Donald Sterling, the longtime owner of the Los Angeles Clippers, was barred from the league for life for making racist statements. V. Stiviano, who recorded Sterling, introduced herself to the world. And the Knicks’ J.R. Smith took advantage of an early start to his offseason by playing many rounds of golf.

Kerr continued to say little publicly about his discussions with the Knicks. So when it was revealed that Kerr had cast the lone first-place vote for the Knicks’ Tim Hardaway Jr. in the NBA’s Rookie of the Year balloting, observers were left to try to connect the dots. Did it mean something?

And while the Knicks did hold a news conference Wednesday night, it was only to unveil the name and logo of their new Development League team based in White Plains. (For the record, the D-League Knicks will be known as the Westchester Knicks.)

Kerr spent 15 seasons in the league as a player, averaging 6 points and 1.8 assists a game. He won three straight championships with the Bulls, from 1996 to 1998, before winning two more as a reserve with the San Antonio Spurs, in 1999 and 2003. He retired as the league’s career leader in 3-point percentage (.454), a mark that still stands.

Kerr served as the president and general manager of the Phoenix Suns from 2007 to 2010. The Suns compiled a 155-91 record and made two playoff appearances during Kerr’s three seasons in charge.

Executives from the Warriors met with Kerr this week in Oklahoma City, where he was broadcasting a game. The Warriors had been pursuing Stan Van Gundy, but he accepted an offer Wednesday to join the Detroit Pistons as their coach and president for basketball operations.

With two suitors, Kerr had all the leverage. He used it to the very end.