The detention of hundreds of South Koreans in a U.S. immigration raid sent shock waves through the Asian nation and plunged Lee Jae Myung into the biggest diplomatic challenge of his young presidency.

Lee, who’s won accolades at home and around the world for his deft handling of his U.S. counterpart, was caught off guard by the raid at an under-construction Hyundai Motor Co.-LG Energy Solution Ltd. battery plant in the state of Georgia. Trying to contain the fallout, he quickly dispatched his top diplomat, to seek the return of about 300 workers.

But Foreign Minister Cho Hyun’s mission will go beyond the immediate fire fighting. The incident trains the spotlight on a multibillion-dollar investment plan and the carefully calibrated diplomacy that helped South Korea land one of the most favorable tariff deals in the world. As part of that agreement reached in July, the country pledged a $350 billion investment package — now suddenly a perilous proposition for companies reliant on South Korean workers and subcontractors to get manufacturing sites up and running.