OTTAWA, Nov 30 (Reuters) - Canada and the United States have finalized a deal to buy up to 16 Boeing Poseidon aircraft as part of a C$10.4 billion ($7.7 billion) project to replace the country's aging fleet of Aurora military surveillance planes, the Canadian Defence Ministry said on Thursday.

The investment includes up to $5.9 billion for P-8A Poseidon aircraft and related equipment, with the balance going toward investments in simulators, infrastructure and weapons, the ministry said in a statement.

The agreement ends months of speculation and follows a challenge from Canadian planemaker Bombardier, which called for an open competition.

Ottawa had reached out to Washington in March about potentially buying Poseidons, arguing that Boeing's aircraft was the only "currently available" one to meet all its requirements. In June, the U.S. State Department approved the potential sale.

"After significant engagement and thorough analysis, we are confident that the P-8A delivers the best anti-submarine and intelligence, surveillance, and reconnaissance capabilities for our country," the defense ministry said.

Canada will procure 14 of 16 Poseidons approved for sale and keep the option open to buy two more. Deliveries of the aircraft are expected to be completed as early as autumn 2027, with full operational capability anticipated by 2033.

($1 = 1.3582 Canadian dollars) (Reporting by Ismail Shakil and Steve Scherer in Ottawa and Allison Lampert in Montreal; Editing by Lisa Shumaker)