SEOUL (Reuters) - General Motors GM.N will stay in South Korea for at least 10 years and set up its Asia-Pacific headquarters in the country, government officials said on Thursday, revealing terms of a deal aimed at rescuing the U.S. automaker's struggling GM Korea unit.

The logo of GM Korea is seen at its Bupyeong plant in Incheon, South Korea March 12, 2018. REUTERS/Kim Hong-Ji

The U.S. car maker’s Korean unit averted a bankruptcy filing with a wage deal clinched last month, but analysts and customers, as well as the South Korean government, have had doubts about GM’s commitment and about how long the loss-making company will remain in business.

The terms of the binding deal to be signed on May 11 seek to assuage some of those concerns.

As per the agreement, GM can’t sell any of its 77 percent stake in GM Korea over the next five years and can’t let it fall below 35 percent thereafter until 2028, South Korean Finance Minister Kim Dong-yeon told a press conference.

The restriction on the stake sale was one of tools that will prevent GM from leaving the South Korean market, Kim said.

He also said the deal package “paved the way for GM to operate continuously beyond 10 years”, referring to concerns that GM may leave after 10 years.

The Detroit car maker and state-run Korea Development Bank (KDB) already have a preliminary deal on $7.15 billion of investments, including $2 billion of capital spending by GM and a $2.8 billion debt-for-equity swap for existing loans GM Korea owes to its parent, to rescue the unit.

As a sign of its long-term commitment, GM plans to set up a new Asia-Pacific headquarters in South Korea, although that excludes China, the government said on Thursday.

GM will also buy more parts from South Korean suppliers for its overseas operations, boosting procurement from about 2 trillion won ($1.85 billion) a year at present, it said.

In return, South Korea will provide funding to local suppliers of GM and other South Korean automakers for the development of parts for electric and self-driving cars, and other key automotive parts.

“It was a very difficult and a critical decision,” chairman of the financial watchdog Financial Service Commission Choi Jong-ku said at the briefing, adding the government had to consider the risk to 156,000 jobs at GM Korea and its suppliers, the eco-system of South Korea’s car industry, as well as exports and local economies.

Barry Engle, President of GM International, said on Thursday that the automaker’s commitment to South Korea was long-term and sincere, adding that although there was still a lot of work to do, he sees a bright future in the country.