After a process that took two years, on November 30, the airlines Avianca  (Colombia), United (U.S.) and Copa (Panama) signed a commercial alliance, will allow the three to share revenue from flights and coordinate schedules.

Avianca, Copa and United are already tied through a code-sharing partnership. All three carriers are members of Star Alliance.

United’s deal with Avianca, long in the works, had undergone significant legal back-and-forth after the Colombian flagship carrier’s No. 2 shareholder Kingsland Ltd tried to halt negotiations between United and Synergy.

The three-way partnership will include flights between the United States and 19 countries in Central and South America (not including Brazil).

“This agreement represents the next chapter in US-Latin American air travel,” says United president Scott Kirby in a statement. “We are excited to work with our Star Alliance partners Avianca and Copa… providing a better overall experience for business and leisure customers traveling across the Western Hemisphere.”

The airlines say they will add new markets and additional flights on existing routes if the partnership is approved.

Joint ventures are increasingly popular among airlines globally, as the deals essentially allow them to collude legally with competitors in certain markets.

Avianca serves around 170 destinations with hubs in Bogota, Colombia and El Salvador, San Salvador and has more than 180 aircraft, while Copa has a fleet of about 100 aircraft and serves about 75 destinations from its hub in Cuidad Panama, according to the companies.

The three together will operate nearly 26% of capacity between Latin America and the United States this year. United, No. 3 U.S carrier and the largest of the three carriers, carries 15% of capacity in the market.

By comparison, American Airlines and Chile’s LATAM signed in January 2016 carry nearly 32% of capacity and Aeromexico and Delta have nearly 17% of capacity in the Latin America-US market.

In a filing on Friday detailing the deal with Avianca, United said it would provide a US$456 million loan to Syngery Aerospace Corporation, Avianca’s owner, using stock in Avianca as collateral. Loss-making Avianca has a roughly US$4 billion debt pile, of which 40 percent is due within the next two years, according to recent financial statements.

The partnership is subject to regulatory regulatory approval in the United States and several jurisdictions in Central and South America.

The airlines do not provide a timeline for implementation of the deal. However, Copa Airlines said in a press release that process would take between 12 and 18 months.  Its chief executive Pedro Heilbron said earlier in November that the Panama-based carrier does not expect regulatory approval of the deal until mid-2020.

Latin American airlines, in general, have experienced a turbulent few years, hit by a double whammy of high oil prices and devaluing currencies in local markets, which make it more expensive to cover dollar-denominated costs like fuel and aircraft rent.

Travel has also suffered in the dominant regional economy Brazil, which has suffered from its deepest recession in decades but remains the largest aviation market in the region, and one of the biggest in the world.

United, which already owns an 8 percent stake in Brazilian carrier Azul SA, said it was exploring the possibility of adding the country to its joint partnership with Avianca and Copa.

United, Avianca, and Copa have regular daily flights to and from Costa Rica.

Stay up to date with the latest stories by signing up to our newsletter, or following us on Facebook.