The Japan Pension Service mistakenly underpaid and overpaid about 400 pensioners as a result of measures taken after a cyberattack that resulted in a massive leak of personal data, it was learned.

According to the agency, the 400 belonged to the 960,000 pensioners whose ID numbers were changed after the attack, sources said Thursday. It was the first such error resulting from the massive data leak in May.

The payment errors involved pension recipients who work but receive the pension.

Some people were paid the same rate even though the amount of income has changed after they changed jobs. For those who had quit working, their pensions were not adjusted upward to reflect the change in their employment status.

The error came to light in early October when some of the pensioners noticed the amount paid to them did not match the financial details in notifications mailed by the agency.

The October pension payment was completed before the agency assigned new identification numbers and sent out new pension booklets to those affected by the leak and whose addresses and personal information had been confirmed.

The agency said it was scrutinizing the mistaken payments and would visit and apologize to those affected. For those who were overpaid, the excess amount will be deducted from the December payments.

The new ID numbers were issued to prevent improper use of their personal information.

The leak occurred when agency employees opened a file in emails that contained a virus.

Hackers used the virus to steal data, including names, identification numbers and addresses in the incident that involved over 1 million people.