There have been plenty of setbacks over the past several years as Embraer (NYSE:ERJ) has completed the development of its KC-390 multirole military jet and prepared to begin deliveries. However, the Brazilian aerospace company finally reached a big milestone last week, as it completed the first KC-390 delivery.

Production and deliveries of the new military jet -- which is suitable for missions ranging from firefighting to search and rescue to carrying troops and equipment -- will ramp up very slowly. However, the long-term opportunity for Embraer is quite significant, particularly because the company's revenue base will shrink dramatically once Boeing (NYSE:BA) completes the purchase of 80% of Embraer's commercial aviation business.

The KC-390 will finally start making money

Over the past several years, Embraer's profits have been dinged repeatedly by special charges related to developing the KC-390. Currency fluctuations and delays related to budget cuts by the Brazilian government caused most of the "cost base revisions" that Embraer reported. However, a particularly big special charge -- totaling $127 million -- came after a test aircraft was severely damaged during ground testing last year.

While that aircraft ultimately had to be written off, Embraer was able to continue the test program with other KC-390s it had already built. This allowed it to receive commercial certification of the new model during 2018.

All of this work culminated in the delivery of the first KC-390 to the Brazilian Air Force last week. Brazil also confirmed its contract to buy a total of 28 KC-390s in the coming years and signed a five-year services and support agreement with Embraer covering its KC-390 fleet.

Additionally, Portugal recently firmed up a long-standing letter of intent for five KC-390s. The contract is worth approximately $932 million, including the value of a simulator, support, and other services. There are another 33 outstanding letters of intent for the KC-390, with Colombia, Chile, and Argentina accounting for the majority of those.

Embraer
A worker rides a bicycle around the hangars next to a private jet at the Embraer headquarters in Sao Jose dos Campos, 100 km (62 miles) from Sao Paulo on May 14, 2013. Reuters/Nacho Doce

Growth will ramp up gradually

In the near term, the revenue and profit contribution from the KC-390 will ramp up slowly. Embraer plans to deliver about two KC-390s annually to the Brazilian Air Force, as executives noted on the company's last earnings call. Meanwhile, the contract with Portugal calls for deliveries to begin in early 2023 and continue at a pace of one per year until 2027.

That said, Embraer has the capacity to build at least 12 KC-390s per year in its main production facility, and it could boost output further by adding a third shift and implementing some supply chain changes.

If Embraer can convert the remaining 33 letters of intent into firm orders, that would allow it to make use of some of its excess production capacity by the mid-2020s. However, a pending joint venture with Boeing covering KC-390 sales and support will be critical to unlocking future growth. This joint venture -- which will be 51% controlled by Embraer -- will use Boeing's global connections and scale to win business from the United States and its allies, vastly expanding the KC-390's addressable market.

The KC-390 is the key to Embraer's long-term growth

Embraer expects to generate between $2.5 billion and $2.8 billion of revenue in 2020, assuming that the Boeing commercial aviation joint venture will be finalized at the end of this year. More than half of that revenue is likely to come from Embraer's executive jet business and related services.

Thus, Embraer's defense (and defense services) business is quite small today. If the Boeing joint venture is successful in boosting international sales of the KC-390, Embraer's defense revenue could soar over the next decade. Furthermore, each KC-390 sale positions the company to receive decades of services and support revenue.

As KC-390 production ramps up to fill Embraer's existing manufacturing capacity and costs come down, the Brazilian aerospace company's profit margin should rise considerably. Services also tend to carry high margins compared to product sales. Investors will have to be patient, but success with the KC-390 export program could pave the way for massive earnings growth at Embraer in the years ahead.

Adam Levine-Weinberg owns shares of Embraer. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.

This article originally appeared in the Motley Fool.