Mr. Leno agreed, setting in motion a slowly building storm that gathered around NBC’s corporate headquarters. What had NBC done? Yes, it had retained the prized Mr. O’Brien and kept Mr. Leno in the fold, but it had also set up a chain of events that would force the late-night leader, Mr. Leno, out the door in 2010, and most likely into the arms of a competitor.  Mr. Leno did not disclose how close he really was to relocating to ABC at 11:35 each weeknight. (Under his old contract he was prohibited from engaging in formal talks with outsiders until next November, though not forbidden from listening to what they had to say.) But for months he has made references on the air to what life might be like at ABC, and the issue with ABC was close enough that he took time last week to call Robert A. Iger, the president of ABC’s parent company, Walt Disney, to break the news that he was staying at NBC.  NBC is breathing easier, but many questions remain: What kind of show will he do, and what will it mean to the network, its affiliates and the late-night lineup now to be headlined by Mr. O’Brien at 11:35 and Jimmy Fallon at 12:35?  Mr. Leno is already thinking about how to reshape his show. “The second half is the tricky part,” he said. “We want to provide as strong a lead-in as we can.” He was referring to one big gamble NBC is taking: that with all its 10 p.m. dramas gone, Mr. Leno’s show will be strong enough to deliver good audiences to local newscasts at 11, as well as to NBC’s economically essential late-night lineup.  Mr. Leno’s new contract seems to be a concession that nobody is certain how this will work out. It is a reported four-year deal, but with a two-year option. (No financial terms have been disclosed.)  “It was a mutual thing,” Mr. Leno said. “I said, you know, they’re making a huge financial commitment. If something’s just not working, well, you don’t want to be there.”  Another potential trouble spot may be guest bookings. Both Mr. Leno’s new show and Mr. O’Brien’s “Tonight Show” will be based in Hollywood. Mr. Leno said that no pressure would ever be applied to guests not to do any other shows. But he said, “I think we will have an advantage saying to press agents, ‘It’s prime time; reach a wider audience.’ ”  Hosts he considers friends — Mr. O’Brien and ABC’s Jimmy Kimmel — will compete for the same guests, Mr. Leno said, making a comparison to baseball: “Your friend is pitching; are you going to try to hit a home run? Yeah! It’s what you do.”  Still, Mr. O’Brien at least won’t have to worry about a true nightmare booking scenario on his first night at “Tonight”: Jay Leno visiting David Letterman. Mr. Leno said the Letterman show had indeed invited him to be a guest that night (June 1). “I would leave the show on Friday and do Dave on Monday,” he said, relating a plan undoubtedly hatched at a time when the Letterman show expected Mr. Leno to be leaving NBC (perhaps in an eight-cylinder huff) for ABC.  Not that it was really going to happen. “It would look like an insult to Conan,” Mr. Leno said. “I would never do that.”  An appearance with Mr. Letterman “would be fun to do sometime,” Mr. Leno said. The relationship between the two late-night titans has often resembled a production of “Who’s Afraid of Virginia Woolf?” But Mr. Leno is feeling mellow about it these days. He said he had recently seen YouTube clips of some of his guest shots on Mr. Letterman’s old NBC show.  “Doing his show in the ’80s, going on and zinging back and forth, that was the most fun for me of anything I ever did in show business,” he said of their relationship.  The last few years were less fun for Mr. Leno, partly because the agreement to step away from “Tonight” led to comments about impending retirement that he found annoying. Performing frequently is part of Mr. Leno’s life; after the interview here, he headed to Las Vegas to dish out more laugh lines at the Mirage hotel.  So why did late night’s biggest star first agree to walk away from his dream job, where he still towered over his competitors, and then to step away from late night altogether? For Mr. Leno it seems to have been a case of he’d rather not fight or switch.  “I’ve never been one of those guys, when the girl says ‘I don’t think we should see each other anymore,’ I go, ‘Why? What can I do?’ No, I’m ‘O.K., babe, I’m gone.’ ” He added: “If they want you to step back, they want you to step back. You serve at the pleasure of the king.”  Of course, king is pretty much the title Mr. Leno has won for himself with his dominance of late night. Couldn’t he have turned his royal back on NBC’s proposition?  “I could have done that, I suppose,” he said. “But then the mysterious sandbag falls on your head. I’m Italian. I know how this works.” He added: “I didn’t want to go against Conan. It’s not so much Conan; well, it’s Conan and it’s everything I’ve worked for. You don’t want to be across the street.”  Some of this trepidation clearly sprang from Mr. Leno’s previous experience with late-night turnover, in 1992, when he took criticism from some quarters for supposedly getting the “Tonight” job at the expense of Mr. Letterman, and then had to twist as NBC reconsidered and almost tossed him out.  “It’s NBC: Never Believe your Contract! Remember that?” Mr. Leno said, resurrecting a line he used in 1993. “That was the first time they were getting rid of me. So this is not new.”  If anything, this drama has had a far bigger cast. “At the time, Conan would have gone to ABC,” Mr. Leno said. “I didn’t know what Dave was going to do, whether Jon Stewart would step in for Dave, and then with Conan you’re fighting two younger guys. And so I was, ‘O.K., what do you guys want to do? Is that what you want to do?’ ”  Mr. Zucker said that everything he proposed to Mr. Leno had one goal: “I didn’t want to lose Jay.” And he proposed a lot, starting with a half-hour show at 8 p.m. “That seemed way wrong,” Mr. Leno said.  Mr. Zucker then offered a prime-time slot every Sunday night. “Once a week is death,” Mr. Leno said.  So Mr. Zucker turned to another NBC Universal property, the USA cable network. Mr. Leno could have 11 p.m. (even though that would have cut into Mr. O’Brien’s “Tonight Show”). “That sort of seemed like living in the basement of your own house,” Mr. Leno said. “I’m still old enough to think network is the place.”  When Mr. Zucker finally offered 10 p.m. weeknights, “things moved pretty quickly,” Mr. Leno said. “Five years ago this wouldn’t have been a good idea, but more people — and younger people — are going to bed at 11 o’clock because they carpool or they have to get up at 6.”  There was also value in the familiar. “When you go someplace else, you don’t know the camera people; they don’t know you,” Mr. Leno said. “It takes a long time to get into that rhythm. And then you have the parade of white guys at 11:30 all doing essentially the same show.”  Mr. Leno will be out of that parade now, or more accurately leading it. “It’s just a different model,” he said. “So it’s either a great idea or ‘Oh my God, what was that?’ ”
NBC is breathing easier since Jay Leno agreed to stay at the network, but questions about his new show remain.