Seoul and Washington have finalized an agreement to release more than 300 South Korean workers who were detained in a large immigration raid at a Hyundai manufacturing site in Georgia, South Korea’s presidential office said Sunday.

Presidential chief of staff Kang Hoon-sik said the two governments completed negotiations on the workers’ release and that Seoul plans to dispatch a charter plane to bring them home once remaining administrative steps are completed. The announcement followed days of diplomatic engagement after the mass operation at the plant.

U.S. immigration authorities said they detained 475 people on Friday, most of them South Korean nationals, after hundreds of federal agents carried out the raid at the sprawling site where Hyundai, in partnership with LG Energy Solution, is building a facility to produce electric vehicles and batteries. South Korea’s Foreign Minister Cho Hyun later said more than 300 South Koreans were among those detained.

Video released by U.S. Immigration and Customs Enforcement showed convoyed vehicles arriving at the site and agents directing workers to line up outside. Some detainees were recorded being frisked and placed in restraints, then transported to an immigration detention center in Folkston, Georgia, near the Florida state line.

Steven Schrank, the lead Georgia agent for Homeland Security Investigations, told reporters Friday that none of the detainees had been charged with criminal offenses and that the investigation was ongoing. U.S. officials described the operation as part of a series of workplace enforcement actions undertaken under the current administration’s immigration priorities.

The site targeted by agents is still under construction and has been described by state officials as among Georgia’s largest economic development projects. Its prominence, and the size of the operation, drew attention from Seoul, which said its diplomats were dispatched to the site to assist detained citizens and to press U.S. authorities for their swift release.

South Korean officials framed the agreement as a priority of the government’s consular and diplomatic efforts. Kang said Seoul will complete administrative procedures to facilitate repatriation once U.S. authorities finalize processing. U.S. officials have said processing and the broader investigation will continue, and that the immigration status of the detainees is under review.

The case has added a diplomatic dimension to domestic debates in both countries over immigration enforcement and the treatment of foreign workers at large industrial projects. Seoul and Washington said they will coordinate on the timing and logistics of the departures and maintain communication as the U.S. inquiry proceeds.