South Korea's government says it has reached an agreement with the US to release its citizens detained in a massive immigration raid at a Hyundai plant in Georgia.

The chief of staff of South Korea's president said a chartered plane would be sent to bring the detainees home if administration procedures were completed.

Kang Hoon-sik said the authorities were trying to improve the visa system to prevent such incidents in the future.

US officials detained 475 people - more than 300 of them South Korean nationals - who they said were found to be illegally working at the battery facility, one of the largest foreign investment projects in the state.

The White House has defended the operation, dismissing concerns that the raid could deter foreign investment.

They were illegal aliens and ICE [Immigration and Customs Enforcement] was just doing its job, President Donald Trump said following the raids on Friday.

Video released by ICE officials showed Asian workers shackled in front of a building, with some wearing yellow vests with names such as Hyundai and LG CNS.

People on short-term or recreational visas are not authorized to work in the US, ICE said. It added that the raid was necessary to protect American jobs.

South Korea, a close US ally, has pledged tens of billions of dollars in American manufacturing investment, partly to offset tariffs. The timing of the raid, as the two governments engage in sensitive trade talks, has raised concern in Seoul.

Trump has actively encouraged major investments from other countries while also tightening visa allocations for foreign companies.

LG Energy Solution, which operates the plant with Hyundai, said many of the LG employees arrested were on business trips with various visas or under a visa waiver programme.

The company has since suspended most business trips to the US, directing employees on assignment in the US to return home immediately.

The raid was described as a shock, by South Korean media, warning it could chill business activities in the US.

The factory, a significant development project in Georgia, employs 1,200 people and represents a major commitment to electric vehicle production.

The arrested workers are currently held at an ICE facility in Folkston, Georgia.