Westpac must refund 40,000 customers after an internal error saw borrowers paying the interest on their home loans longer than necessary.

The banking giant said manual processing error left borrowers on interest-only loans, instead of being transferred to principal-and-interest once the interest-only period expired. The glitch meant Westpac, St George, Bank of Melbourne, and Bank SA customers were not paying the principal as arranged.

“We identified a mortgage processing error which led to customers continuing to make interest-only repayments on their mortgage, instead of being switched to principal-and-interest repayments at the end of their interest-only period,” a Westpac spokesperson said in a statement.

Customers received a letter stating that the bank would refund 40,000 borrowers who overpaid their interest. Another 30,000 customers who made advanced mortgaged repayments suffered no financial impact and would not be refunded, according to The Daily Telegraph.

The error first came to light in 2017 with borrowers, with an interest-only period expiring between 2009 and 2016 the most affected. Around 70% of the customers had already been refunded.

Westpac already allocated $281m for remediation costs in its full-year result on November 2018, but said it refunds would likely exceed the budget.

“Customers who were not ahead of repayments paid excess interest when their home loan did not switch to principal and interest at the correct time had to be remediated. Many of these customers have already been refunded and we are working hard to complete this remediation program,” Ranken told Yahoo Finance.

Westpac advised affected customers to contact their specialist bankers for assistance.