Boeing Co won a $30 billion contract for 179 new U.S. Air Force refueling planes on Thursday, trumping arch rival Airbus parent EADS in a fiercely contested competition that began nearly a decade ago.

It was the third effort since 2001 to start replacing 50-year-old Boeing-made KC-135 Stratotankers, built before man first stepped on the moon.

Boeing was the clear winner, Deputy Defense Secretary William Lynn told reporters at the Pentagon. He said Boeing offered a far better deal at a time when defense budgets are under increasing pressure.

Boeing's shares rose 3.9 percent in afterhours trading on the news which gave the Chicago-based aerospace giant a solid win as it struggles to gets its ailing 787 Dreamliner commercial airplane program back on track.

EADS expressed disappointment and concern about the decision, but said the contract was just one business opportunity among many in the United States.

EADS said last week it would only protest the contract if it saw egregious errors.

Boeing was humbled by the win, said Dennis Muilenburg, chief executive of Boeing's defense unit. He gave no details on pricing, but said Boeing was able to cut costs by working more closely with its commercial wing and making substantial investments to improve its 767 production line.

Muilenburg added that the Boeing plane was smaller, used 24 percent less fuel, and would result in less reconstruction costs for military airports.

U.S. Air Force Secretary Michael Donley said the initial $3.5 billion fixed-price contract would pay for design, development and delivery of 18 planes by 2017, but could be worth over $30 billion in coming years.

Previous Air Force efforts to buy new planes to refuel other aircraft during flight have been marred by an ethics scandal and selection errors.

The contest has sparked transatlantic tensions and clashes among U.S. lawmakers eager to bring high-paying aerospace jobs to their states.

ANALYSTS SURPRISED

Analysts were caught off guard by the contract, given predictions that EADS would aggressively underbid Boeing.

Teal Group's Richard Aboulafia called the decision a major surprise and said if it holds, Boeing will have succeeded in blocking EADS's biggest defense initiative.

Lynn said EADS could protest the decision, but said Pentagon officials were convinced the decision was fair.

We think we've established a clear, a transparent and an open process and we think we've executed on that and it will not yield grounds for protest, Lynn told the briefing.

EADS is waiting until after a formal briefing by the Air Force, which is likely to occur on Wednesday, to decide what to do, but its statement appeared to look to future opportunities to do business with the U.S. military.

EADS has 10 days to file a formal protest after a contract award and its congressional backers can also try to block the award legislatively.

Several lawmakers from Alabama, where EADS was to have built its plane, said they would examine the decision carefully to ensure it was fair.

Senator Jeff Sessions said the Air Force had overlooked the fact that the EADS plane was newer, stronger and more effective. It became a low-price shootout, he told Reuters after a press conference in Birmingham.

Air Force Chief of Staff General Norton Schwartz said he was pleased that troops would finally get a new refueling plane. I'm pleased that this has produced an outcome ... that we'll get about delivering a capability that's long overdue -- and we'll stop talking about it.

EADS and Boeing, arch rivals in the market for passenger jets, have fought bitterly in public over the contest with expensive advertisements while their respective supporters have battled it out at dueling news conferences.

BLOW TO SOUTHERN STATES

The decision disappointed EADS backers in the South, who had hoped EADS' A330-based tanker would boost a region still struggling with the aftermath of Hurricane Katrina in 2005 and last year's BP oil spill.

Alabama Governor Robert Bentley put a brave face on the news, telling hundreds of officials and business leaders: There's sunshine above the clouds. We are going to still work hard and we are going to still create jobs in this area.

Boeing offered a variant of its 767 twin-engined, wide-body passenger jet, to be built in Washington state and Kansas, where lawmakers and union officials welcomed the news.

Brian Ruttenbur, a defense analyst with Morgan Keegan, said the decision gives Boeing a shot in the arm as the company looks to fix issues with its 787 commercial plane program.

Defense officials, who kept the news under wraps until it was announced at the Pentagon, gave few details about the bids, saying only that the offers were more than one percent apart.

The Air Force's initial $23.5 billion plan to lease and then buy 100 modified Boeing 767s as tankers, fell apart in 2004 after a procurement scandal sent a former Boeing executive and former Air Force official to jail for ethics violations.

EADS, partnered with Northrop Grumman Corp, won a 179-plane deal in February 2008, only to have it canceled after government auditors upheld parts of a protest by Boeing.

Northrop subsequently pulled out, leaving the European aerospace and defense company to bid alone.

Documents from the previous competition showed an average price for the Airbus plane of $160 million versus $168 million for the Boeing plane, but analysts say the price could be 5 to 10 percent lower this time.

Shares of Boeing rose 3.9 percent to $73.55 in afterhours trading on Thursday after closing up 0.8 percent to $70.76 in regular trading on the New York Stock Exchange.

(Reporting by Andrea Shalal-Esa, Tim Hepher, Phil Stewart, Karen Jacobs, Kelli Dugan, Verna Gates, and Kyle Peterson; Editing by Tim Dobbyn, Dave Zimmerman)