Spain has finalized a deal for Boeing [BA] to upgrade its CH-47D Chinooks to the most-modern version of the heavylift helicopters.

Under the deal, part of a total $1.3 billion foreign military sales package greenlit by the U.S. State Department in April, Boeing…