By Liana B. Baker

NEW YORK (Reuters) - When Time Warner Inc's <TWX.N> Jeff Bewkes welcomed AT&T Inc's <T.N> Randall Stephenson for lunch at Time Warner Center in New York in late August, their meeting was supposed to be one of the catch-ups the two chief executives have had over the years.

And it certainly started that way, with the two men chatting about the direction of the media, broadband and mobile telecommunications industries, according to accounts given by Stephenson and Bewkes as well as people familiar with the discussions who spoke on condition of anonymity.

Stephenson and Bewkes discussed how Time Warner could reach more customers through AT&T's mobile network, and how that content could reinforce the loyalty of customers. Some of this could be achieved through closer ties and partnerships.

But then Stephenson showed his hand. He proposed an outright merger of the two companies, the biggest shakeup in the U.S. media landscape since U.S. telecommunications giant Comcast Corp's <CMCSA.O> takeover of media conglomerate NBC Universal in 2011.

"The more we talked about it, the more it fell into place, that there would be benefits that might be significant and might allow us to evolve the ecosystem faster," Bewkes told reporters on a conference call on Saturday.

Comcast's deal had greatly influenced Stephenson's thinking, spurring him to look for media and video acquisitions now that AT&T had the most video subscribers in the U.S. with 25 million. The media companies he first looked at buying, such as Starz <STRZA.O>, which later merged with Lions Gate Entertainment Corp <LGF.N>, and Scripps Network Interactive Inc <SNI.O>, were too small for his liking.

Stephenson's problem was that the big media companies he deemed attractive were not easy targets. CBS Corp <CBS.N> and Viacom <VIAB.O> were family controlled, while Walt Disney Co <DIS.N>, with a $150 billion market capitalization, was too big.

When Twenty-First Century Fox Inc <FOXA.O> made a hostile acquisition approach to Time Warner in 2014, AT&T was awaiting regulatory approval on its deal to buy DirecTV, and couldn't pursue another large deal at the same time.

During the year after the DirecTV acquisition closed in July 2015, AT&T had been thinking about going two ways; either a big international acquisition, or a big content deal. Before buying DirecTV, it had looked at combining its business with Vodafone Group Plc <VOD.L> in Europe, according to the sources. But after buying two smaller wireless companies in Mexico, it couldn't find an international acquisition that suited its appetite.

More than a year after the DirecTV deal closed however, Stephenson felt he had the firepower to pursue Time Warner with an $85.4 billion cash-and-stock bid, this year's biggest attempted acquisition globally.

The deal was referred to within AT&T, in order to prevent leaks, as "Project Bobtail", whose aim was to acquire "Rabbit", the code name for Time Warner and perhaps a homage to Warner Bros' Bugs Bunny character. AT&T's code name was "Lily", the same as the customer service person who appears in their commercials.

"This thing just had what I would call gravity, and it seemed to move along on its own and we began negotiating out terms very quickly and it was a very natural process," Stephenson said on the media call.

TRUSTED BANKERS

Soon after Stephenson proposed the combination to Bewkes, the companies called in their most trusted investment bank advisers.

AT&T decided to work with Woody Young, who had joined boutique bank Perella Weinberg Partners LP in January. He had worked on deals for AT&T for two decades, and most recently advised AT&T on its DirecTV deal in 2014, when he was at Lazard Ltd <LAZ.N>.

Time Warner enlisted Allen & Company LLC banker Ketan Mehta, who had been Time Warner's banker for 12 years and had most recently defended Time Warner from Fox when he was at Citi in 2014. He had also helped defend Time Warner against activist investor Carl Icahn in 2006.

The priority was to keep the deal secret from the media, a challenge given that Time Warner has large fiefdoms in the industry, with HBO in New York, Turner Broadcasting and its news unit CNN in Atlanta and Warner Bros in Los Angeles.

Time Warner never reached out to other potential suitors during its talks with AT&T, according to the sources. Apple Inc <AAPL.O>, widely speculated as another potential buyer for Time Warner, never showed a strong interest, the sources said, pointing out that after Fox's bid for Time Warner many other companies considered an acquisition but never made any offers.

Large investment banks were brought on for financing in the week leading up to AT&T's and Time Warner's announcement on Saturday. When Bloomberg News reported on Thursday that the two companies had informal conversations about a merger without advisors, Stephenson and Bewkes had already shaken hands on the deal and their boards were close to approving it over the weekend. To finalize the deal, Time Warner's board met in the offices of law firm Cravath, Swaine & Moore LLP's offices in New York and AT&T's board meeting was held at its headquarters in Dallas on Saturday.

The deal was announced Saturday night, which caused Stephenson, an Oklahoma native, to miss a University of Oklahoma college football game. He had to ask a reporter for the score.

(Reporting by Liana B. Baker in New York; Additional reporting by Jessica Toonkel and Malathi Nayak in New York; Editing by Greg Roumeliotis and Mary Milliken)