Boeing has signed a multibillion-dollar deal with the U.S. Navy and the Royal Australian Air Force for 20 P-8A Poseidon aircraft, the Pentagon announced late Thursday. The U.S. Navy, which is replacing its old P-3C Orion aircraft, will spend around $2.5 billion for 16 of the specialized submarine-hunting aircraft, while the Australians will pay $2.15 billion for just four.

The lower per-unit price for the U.S. Navy is because of a fixed-price incentive offered by Boeing only to the Navy.

“We continue to hear feedback from our U.S. Navy customer about the incredible capabilities of the P-8A,” James Dodd, Boeing's vice president and program manager of P-8 Programs, said Thursday, according to a Defense News report. “The deployed squadrons tell us it’s exceeding expectations. We’re looking forward to providing even more capability to the fleet and to Australia.”

The deal with Australia follows its decision in 2014 to buy eight of the P-8As, with the option for four more. India currently operates the aircraft, while the U.K.’s Royal Air Force recently said it would buy nine to restore its aerial maritime presence, which it scrapped in 2010.

The deal is good news for Boeing's defense arm, which recently lost out on a lucrative U.S. Air Force contract to build the new long-range bomber and faces uncertainty over its F-18 and F-15 production lines in St. Louis, which need additional orders to stay open until the end of the decade.

The Chicago-based defense giant looks set to miss out on a lucrative contract for dozens of its F-18 Super Hornets after Kuwait declared Wednesday that it would buy the Eurofighter Typhoon jet. It’s not yet clear whether Kuwait wants both types of aircraft. However, Boeing remains hopeful that a deal can still be done. Boeing will “continue to work with our potential international customers,” a Boeing spokesperson said of the potential deal with Kuwait.