A glitch let customers of an Ethiopian bank withdraw more money they had in their accounts. By the time the bank discovered the issue, it had lost as much as $40 million.

It is vowing to go after customers to get their money back.

Thousands of people withdrew cash from Commerical Bank of Ethiopia (CBE) ATMs as news spread across college campuses on Saturday.

Long lines formed at campus ATMs with students withdrew large amounts of cash.

The malfunction reportedly credited transfers but failed to debt accounts.

Close to 66,000 customers carried out at least 25,000 transactions during the glitch, industry sources told local news site Fortune News.

The bank eventually shut down all transactions, crippling banking services during the outage.

The bank claims "many" of the people to took money have returned the money. In a Facebook post, the bank says "We appreciate the positive response" but warned that the rest of their customers have until Saturday to return any money that wasn't theirs.

CBE president Abe Sano threatened to prosecute anyone who did not return the money.

"There is no way that they can escape because they are digital [transactions] and they are our customers," Sano told the BBC. "We know them. They are traceable and they are legally accountable for what they did."

He disputed reports that customers had withdrawn $40M claiming the amount taken was far smaller.

The Commercial Bank of Ethiopia was formed in 1942. CBE says it has more than 40 million account holders in its more than 1940 branches. It has more than 8.3 million active ATM card holders.