The benchmark KOSPI index is displayed on screen at a dealing room of Hana Bank in Seoul, Thursday. Yonhap

Korean stocks ended higher Thursday, rebounding after a sharp fall earlier in the day, as major semiconductor shares gained ground after export data proved the sector's robust performance, while uncertainties over the U.S.-Iran war remained in place.

After choppy trading, the benchmark Korea Composite Stock Price Index (KOSPI) added 33.13 points, or 0.43 percent, to close at 7,763.95. The index had started nearly 3 percent lower.

The secondary KOSDAQ surged 4.76 percent to end at 996.93, with the bourse operator having issued a sidecar for the index at around 1:58 p.m., halting program trading for five minutes.

The KOSPI had kicked off weak tracking an overnight tech slide on Wall Street, but turned higher as investors bet on the continued strong performance of the semiconductor sector after government data showed Korea's chip exports more than tripled from a year earlier in the first 10 days of June to $11 billion.