Continental Airlines Inc has restarted merger talks with UAL Corp's United Airlines, two years after walking away from almost sealing a deal, a source briefed on the matter said on Thursday.

The talks are in very early stages, though much of the groundwork was laid in 2008, the source said. United and Continental came very close to merging at the time, but the talks fell apart as Continental chose to pursue an alliance instead.

The talks come as United is in similar discussions with US Airways Group Inc , but those talks are much farther along, the source said. US Air and United are in talks that could create the second-largest U.S. carrier. Those discussions, aimed at cutting costs and competing with the now combined Delta Air Lines Inc and Northwest Airlines, have been going on for months, the sources said.

UAL, Continental and US Airways declined comment.

Shares of UAL closed up 5.3 percent while Continental closed up 2.2 percent following the news, which was first reported by the New York Times. US Airways closed down 0.1 percent.

Since the news of the United-US Airways talks broke last week, shares of UAL have surged more than 22 percent, despite reports that it would be the acquirer in a deal with US Airways.

US Airways shares have risen 9 percent since then, and Continental has climbed 15 percent, reflecting investor expectations of a resumption in United-Continental talks.

I think it's the path of least resistance from a labor perspective, from a regulatory review perspective and from a political perspective, Stifel Nicolaus analyst Hunter Keay said.

CONSOLIDATION NEEDED

Many airline executives have called for consolidation, saying it is a necessity to allow the industry to return to profitability.

Airlines, struggling with high fuel prices and a pullback in consumer spending amid a weak economy, have lost $50 billion in the past 10 years, according to the International Air Transport Association.

The industry lost $11 billion in 2009 alone.

Still, Continental has long said it would prefer to remain independent. But at a conference in March, Chief Executive Jeff Smisek said the company would bulk up defensively if it would be in its best interest.

A Continental-United merger might be easier to get through the labor unions, which can be a major force in getting a deal approved.

United's pilot union said on Thursday it would support a United-Continental merger. For United's pilots, Continental, rather than US Airways, represents a more logical merger partner for United Airlines, the union said in a statement.

UAL's pilots union last week said the pilots would not benefit from a merger with US Airways, adding it would vehemently oppose a merger that would not lead to a strong and viable carrier.

A spokeswoman for Continental's pilots union said the group had no reaction after news broke Thursday.

Even after United and Continental halted merger talks in 2008, their pilot groups have continued to talk up to two to three times a week and discuss the possibility of a merger, Capt. Jay Pierce, head of Continental's pilot union, told Reuters in an interview last week.

They have discussed a collective bargaining agreement and talked about a process to merge seniority lists, Pierce said.

(Reporting by Jui Chakravorty; Additional reporting by Deepa Seetharaman, Kyle Peterson and Karen Jacobs; Editing by Leslie Gevirtz, Gerald E. McCormick, Phil Berlowitz)