Citing price and performance, Brazil's Air Force said it would buy 36 Swedish-made Gripen fighters from Saab, instead of the Boeing F/A-18 Super Hornet. The deal, estimated at about $4.5 billion, was seen as a key piece in Boeing's bid to extend production of the Super Hornet here in St. Louis, which is scheduled to wind down in two years.

As Brazil's decade-long fighter competition came to a close, Boeing was seen as the favorite over Saab and French plane-maker Dassault. But the company appeared to lose momentum after news broke of National Security Agency spying on Brazilian companies and officials, including President Dilma Rouseff.

The incident soured recently improving relations between the U.S. and South America's biggest economy, and Rouseff canceled a September visit to Washington, which had the fighter-jet purchase on the agenda.

The spying probably wasn't the only factor in Brazil's decision Wednesday. Brazil's announcement cited the Gripen's lower cost and quality performance, and aerospace analyst Richard Aboulafia said Brazil, which has faced big protests over spending cuts, might simply have chosen the cheaper airplane.

"You're not talking about a superpower here," he said. "You're talking about a country that's just patrolling its airspace and its coast."

But, he said, some U.S. diplomacy probably could have helped Boeing's cause, and that was off the table after former NSA contractor Edward Snowden leaked documents detailing surveillance in Brazil.

"I think it was an issue," Aboulafia said. "But we'll never know how big."

Boeing had no comment on the potential impact of the NSA snooping revelations. In a statement, it termed the Brazilian Air Force's decision "disappointing" but said Boeing was still committed to growing in the country.

"Over the next several weeks, we will work with the Brazilian Air Force to better understand its decision," the company said. "Our participation in the competition offered the opportunity to establish significant partnerships and collaboration with Brazilian government and industry, which will continue to expand regardless of the decision."

Still, losing the fighter deal is a blow to Boeing's beleaguered F/A-18 Super Hornet assembly line, which supports several thousand jobs in St. Louis. The plane's primary customer, the U.S. Navy, is scheduled to receive its last jet in 2016. The Brazil order would have extended production by at least a year and enabled Boeing to lower its costs for another potential Navy purchase.

Earlier this month, the Super Hornet program's top executive, Mike Gibbons, said the company must decide by March whether to invest tens of millions of its own money to keep the plane's lengthy supply chains up and running, or begin the process of winding down production. He said he was confident more orders would emerge, but it's not clear from where.

Boeing and its allies, including Missouri Republican Sen. Roy Blunt, have launched a public campaign to urge the Pentagon to buy more Super Hornets, which cost $50 million to $55 million each. But so far the Navy has stuck to plans for the Lockheed Martin-built F-35 Joint Strike Fighter.

Meanwhile international sales have proven to be tough sledding. Beyond Australia, which has purchased 24 and in March ordered 24 more, no foreign air force has committed to buy Super Hornets. India chose French-made Dassault fighters in a $12 billion deal in 2012, and Brazil was one of the biggest orders left on the table, with follow-on orders likely to grow the full contract beyond $4.5 billion. Boeing continues to market the Super Hornet to Malaysia, Kuwait, the United Arab Emirates and other countries, but no deals are expected to close soon.

Aboulafia said that at this point the future of the Super Hornet -- and with it thousands of jobs in St. Louis -- came down to one customer: "It's up to the Navy."