SEOUL, South Korea — The South Korean police said on Thursday that the North’s main intelligence agency had stolen the personal data of more than 10 million customers of an online shopping mall in the South, in what they said was an attempt to obtain foreign currency.

The online mall, Interpark, was subjected in May to an online attack on a server that contained customers’ names, email addresses, telephone numbers and other personal data, the National Police Agency said.

Interpark did not learn about the breach until July 11, when it received an anonymous message threatening to publicize the leak of personal data unless it paid the equivalent of $2.6 billion in South Korea’s currency, the won. After the attack was reported, thousands of Interpark customers threatened to sue for damages. Most of the customers whose data was stolen were South Koreans.