Defying the expectations of some industry watchers, Boeing (NYSE:BA) edged out rival Lockheed Martin (NYSE:LMT) for a contract to build the Navy's new submarine-hunting airplane.

As part of a $3.9-billion pact that may be worth as much as $15 billion over 10 years, Boeing will provide the Navy with a new plane based on its 737 aircraft. The new plane will replace the aging P-3, a Lockheed design. Northrop Grumman (NYSE:NOC) and Raytheon (NYSE:RTN), among others, will serve as subcontractors on the project.

The deal suggests that despite the continued controversy over Boeing's tanker deal with the Air Force, the company's defense business is alive and well. The agreement also provides further validation for the notion of transforming passenger aircraft into military workhorses, the concept behind Boeing's proposal to use the 767 as an Air Force tanker. Unlike the Air Force tanker fleet, though, there seems to be general agreement that the P-3, based on a design in use since 1962, needs to be replaced.

This latest deal marks a string of positive news for Boeing. Its repositioned Commercial Finance unit is primed to support sales of Boeing aircraft with the resources to entice airline customers. The Dreamliner is up, up, and away, and the company seems confident of its success. Still, Boeing shares have flown into the stratosphere over the past few months. The company's prospects remain good, but investors may want to wait for the shares to descend a bit before piling on board.

Fool contributor Brian Gorman does not own shares of any of the companies mentioned.