A South Korean shipping company that filed for bankruptcy protection five years ago emerged as the surprise winning bidder for some assets of the collapsed Hanjin Shipping Co., pipping a bigger rival that is undergoing a creditor-led debt revamp. Korea Line Corp., the nation’s second-largest bulk carrier, beat Hyundai Merchant Marine Co. to be the preferred bidder for Hanjin’s Asia-U.S. business, a spokesman for the Seoul Central District Court said in a text message Monday. Final sale documents will be signed Nov. 21, according to the court. Shares of Korea Line slumped the most in three years. A successful acquisition of the assets will mark Korea Line’s entry into the container-shipping business, helping it challenge the dominance of Hyundai Merchant on the busy Asia-U.S. route. The sale process caps more than two months of turmoil triggered by Hanjin’s bankruptcy filing that underscored the industry’s struggle with weak demand, overcapacity and depressed freight rates. “This is unexpected,” said Rahul Kapoor, a director at Drewry Financial Research Services Ltd. in Singapore. “It comes down to price. For the court, it was the price because they need to repay debt.” Korea Line, which trails Pan Ocean Co. among South Korean bulk-shipping companies, is expanding after exiting from bankruptcy protection, which it filed for in 2011. Bought by the Samra Midas Group in 2013, it operates 29 vessels hauling goods such as iron ore, crude oil and cars. Container shipping companies carry a wide range of goods such as clothes, furniture and bananas, while bulk carriers ship unpacked cargo including coal, cement and grains. Better Terms Korea Line offered better terms in its bid, including taking on all employees, the court spokesman said in the text message, without elaborating. Also included in the bid was Korea Line’s interest to buy Hanjin’s 54 percent stake in a port terminal in Long Beach, California and some of Hanjin’s vessels. “Rather than focusing on competition and reckless expansion, the company will focus on profitability and rebuilding customer confidence,” Korea Line said in a statement Monday. It will use cash generated internally to purchase Hanjin’s local offices in Asia, the U.S., staff and logistics systems, it said. Shares of Korea Line tumbled 14 percent to 16,400 won on Tuesday in Seoul, the biggest loss since November, 2013. Hanjin shares climbed 3.6 percent to 875 won, the biggest gain in two weeks. Net Loss Hanjin on Monday reported a third-quarter net loss of 2.92 trillion won ($2.5 billion), compared with a profit of 122.4 billion won a year earlier. Hyundai Merchant posted a net income of 296.5 billion won, swinging from a loss of 34.4 billion won a year earlier. Daewoo Shipbuilding & Marine Engineering Co., which builds vessels, posted a loss of 227.8 billion won, narrowing from a loss of 1.15 trillion won a year earlier. Hyundai Merchant shares fell 2.7 percent Tuesday. Seoul-based Hanjin filed for bankruptcy protection on Aug. 31 after creditors balked at extending loans. Once the world’s seventh-biggest container line, its fleet has shrunk to 14 ships, about a tenth of its former size, after returning most of the chartered vessels to owners on the advise of the court. Of the chartered vessels, all except two have been returned to owners, who have since leased them to others and changed the ships’ names. Maersk Line, the world’s biggest boxship operator owned by A.P. Moeller-Maersk A/S, has said it’s among companies that have taken on some of the Hanjin vessels. Hanjin is also winding down its Europe business and said last week it would let go of about 700 of its crew. Hyundai Merchant will focus on improving its financials in the short term and strengthening its competitiveness in the long term, the company said in an e-mailed statement Monday. It will also add more container terminals in South Korea and overseas, according to the statement.