NEW YORK — The outlook for Lehman Brothers' future seemed dim Sunday after Barclays PLC withdrew its bid to buy the beleaguered investment bank and government officials and Wall Street bankers remained at an impasse about a rescue plan.

The withdrawal of Barclays, which along with Bank of America Corp. was considered a front-runner to buy Lehman, demonstrated how complicated negotiations over Lehman's fate had become. And, Sunday afternoon, The Wall Street Journal reported that Bank of America and Merrill Lynch & Co. were involved in merger talks — which would knock Bank of America out of contention as well.

The Lehman talks were aimed at selling the investment bank in whole or in part. The sticking point was the potential buyers' insistence that the Bush administration offer the kind of help it did in brokering the buyout of Bear Stearns Cos. last March, when the government agreed to a $29 billion loan to buyer JPMorgan Chase & Co. from the Federal Reserve. But Treasury Secretary Henry Paulson said the government will not help close a Lehman deal.

Lehman declined to comment on the talks.

If no deal were reached, it raised the specter of a bankruptcy and liquidation of the 158-year old investment bank. Bankers and investment banking officials briefed on the talks described them as being both complicated and fluid, and that there was still hope that an agreement can be brokered or that new bidders might emerge. They spoke on condition of anonymity because talks were ongoing.

There were signs that Lehman Brothers Holdings Inc. might be edging closer to a bankruptcy filing, with several reports that it has hired Weil, Gotshal & Manges, the law firm that handled the collapse of investment firm Drexel Burnham Lambert in 1990.

Moreover, there was also an emergency trading session being held at the International Swaps and Derviatives Association to "reduce risk associated with a potential Lehman Brothers Holdings Inc. bankruptcy." The ISDA, which arranges trades for derivatives, said it was allowing customers to make trades and unwind positions linked to Lehman — but that those trades would be voided if no filing occurs before midnight.

Barclays, Britain's third-largest bank, backed out of talks on Sunday after emerging during the morning as a front-runner to take over Lehman's assets, according to a person inside the U.K. bank who spoke on condition of anonymity, in keeping with company policy. The person, who had knowledge of the talks, said the decision was "very unlikely" to change. He said Lehman was attractive but did not meet what he described as Barclay's stringent requirements.

The Journal said on its Web site that after Bank of America was unable to reach a deal for Lehamn, it turned instead to a possible combination with Merrill, considered a better fit for the bank.

Several private-equity firms were also believed to be interested in Lehman's assets. Bankers and officials with direct knowledge of the discussions described the talks as complicated Sunday morning.

Top officials from the Federal Reserve and the Treasury Department and executives from several Wall Street banks were huddled at the New York Fed's downtown Manhattan headquarters for a third day seeking a solution to Lehman's financial crisis. Failure could prompt skittish investors to unload shares of financial companies, a contagion that might affect stock markets around the world when they reopen Monday. Asian markets will begin trading Sunday night Eastern time.

Paulson, Timothy Geithner, president of the New York Fed, and Securities and Exchange Commission Chairman Christopher Cox were among those taking part in the meetings. Federal Reserve Chairman Ben Bernanke is actively engaged in the deliberations but wasn't in attendance.

Paulson went into the weekend discussions insisting that government money should not be used to resolve Lehman's problems, arguing that the current situation is different from the sale of Bear Stearns to JP Morgan Chase six months ago in which the Fed put up $29 billion in loans.

In Lehman's case, Paulson believed that financial markets have been aware of Lehman's problems for a much longer period and have had time to prepare and investment banks also now have the ability to obtain emergency loans directly from the Fed, a crucial support that they did not have back in March when Bear Stearns was rescued.

A person familiar with Paulson's thinking said on Friday that Paulson was "adamant that there be no government money in the resolution of this situation." This person, who spoke on condition of anonymity because of the sensitivity of the negotiations, said on Sunday that Paulson had not changed his views during the three days of talks.

Paulson's tough bargaining stance received support from outside observers Sunday, who argued that the government had no choice but to draw a line in the sand.

"If Treasury put money into the Lehman deal, then going forward no deal would get done without Treasury help," said Mark Zandi, chief economist at Moody's "Every potential buyer would wait until Treasury stepped in and that would mean Treasury would be on the hook for a lot more bailouts."

In the Lehman talks, bankers and government officials were also trying to tackle a broader agenda that includes problems at American International Group Inc. and Washington Mutual Inc., said the investment bank officials, who were briefed on the talks.

AIG, the world's largest insurer, and WaMu, the nation's biggest savings bank, have taken steep losses during the past year from risky investments. Investors, worried they do not have enough cash on their balance sheets to withstand further hits, unloaded their shares on Friday.

Lehman put itself on the block earlier last week. Bad bets on real-estate holdings — which have factored into bank failures and caused other financial companies to founder — have thrust the firm in peril. It has been dogged by growing doubts about whether other financial institutions would continue to do business with it.

Richard S. Fuld, Lehman's longtime CEO, pitched a plan to shareholders Wednesday that would spin off Lehman's soured real estate holdings into a separately traded company. He would then raise cash by selling a majority stake in the company's unit that manages money for people and institutions. That division includes asset manager Neuberger Berman.

AP Business Writer Raphael Satter contributed to this story from London.