Media playback is unsupported on your device Media caption Tesco Bank chief executive tells Radio 4's Today around 20,000 customers were affected

Tesco Bank's chief executive has blamed "a systematic, sophisticated attack" for the money taken from 20,000 of its customer accounts.

Benny Higgins said the bank knew "exactly" what the attack was, but could not say more because it was part of a criminal investigation.

He said all affected customers would be refunded by the end of Tuesday.

About 40,000 accounts saw suspicious transactions over the weekend, of which half had money taken.

The bank is still blocking current account customers from making online payments using their debit card, a temporary measure it put in place on Sunday.

But it said customers would still be able to use their cards for cash withdrawals and chip and pin payments, while bill payments and direct debits would continue as normal.

"We are working hard to resume normal service on current accounts as soon as possible," said Mr Higgins.

Earlier, the bank confirmed some accounts "have been subject to online criminal activity, in some cases resulting in money being withdrawn fraudulently".

Mr Higgins also apologised for the "worry and inconvenience" that customers have faced.

Tesco Bank attack: How can you protect your account?

Tesco bank attack: What do we know?

One cybersecurity expert said this could be an unprecedented breach at a British bank.

I was just about to go to bed when I received a text message from Tesco saying there had been fraud. So of course you panic." Kevin Smith, Tesco Bank customer

"I've not heard of an attack of this nature and scale on a UK bank where it appears that the bank's central system is the target," said Prof Alan Woodward, a security consultant who has worked with Europol.

Over the weekend, customers complained about money being withdrawn without permission, cards being blocked and long delays to get through to the bank on the phone.

"Any financial loss that results from this fraudulent activity will be borne by the bank," Mr Higgins said. "Customers are not at financial risk."

Tesco has yet to use the word "hacking" to describe the breach.

The bank has more than seven million customer accounts and 4,000 staff, based in Edinburgh, Glasgow and Newcastle.

Media playback is unsupported on your device Media caption 'Tesco texted to say fraud on account'

Kevin Smith, from Blackpool, said he had lost £500 from one account and £20 from another.

He said: "I was just about to go to bed when I received a text message from Tesco saying there had been fraud on my account. So of course you panic."

Alan Baxter, from Berwick-upon-Tweed, said he had lost £600, leaving him with just £21.88 in the bank.

He said: "Tesco said they couldn't offer me emergency funds but would offer £25 as a goodwill gesture.

"I've got food and petrol to pay for. I have a delivery of coal coming tomorrow for our coal-fired heater and I won't be able to pay."

'Money has vanished'

Other customers complained on Tesco Bank's website and through social media about long delays when calling the company's customer service line to find out if their account was affected.

Mark Noakes, from Thrapston, told the BBC: "Looked at my account this morning to find a large hole! There was £2 in there; there should have been a lot more!

"Finally got through to customer services to be told it would take 48 hours to sort as there had been a lot of transactions on my account that could not be linked to me or my wife.

"For such a big company they are not being professional. I'm doing well compared to some others as I have another bank account and this will all get sorted somehow."

Image copyright Tesco Bank

Analysis: Rory Cellan-Jones, BBC technology correspondent

Make no mistake, while Tesco Bank is stressing that relatively small amounts were taken from 20,000 accounts, this is a very serious security incident.

All Tesco Bank will say is that it has been the victim of "online criminal activity" so we have little detail on the nature of the attack.

But what is different is that it involves tens of thousands falling victim in a 24 hour period to what appears to be an automated process, rather than individuals clicking on links in phishing emails or having their details stolen after downloading malicious software.

That could involve the attackers exploiting a vulnerability in the bank's website - or even gaining physical access to a branch and then the central systems.

Whatever has happened, the damage to trust in Tesco Bank and online banking in general will be greater than the financial cost.

Robert Schifreen, editor of the computer safety website SecuritySmart, said Tesco Bank must tell people what happened and how fraudsters obtained customers' bank details.

"It could be, for example, that people have been attaching skimming devices, card readers and cameras specifically to Tesco's cash point machines, so that they've been capturing people's accounts there," he told the BBC.

"It could be somebody who works at Tesco Bank who's had access to the database. It could be somebody else, who Tesco have passed information to, and that information has been hacked."

'Action and arrests'

A National Crime Agency (NCA) spokesman confirmed it was leading the investigation into the case, but stressed there was "no set formula" for dealing with cyber attacks, which tend to "vary in terms of sophistication".

"It will be investigated and hopefully that will lead to action and arrests," he said.

Media playback is unsupported on your device Media caption WATCH: Experts say the attack is unlike any they have seen before

The UK's data regulator, the Information Commissioner's Office, also said it was looking into the case and could investigate if customers' personal data has not been kept secure.

Tesco Bank said: "We continue to work with the authorities and regulators to address the fraud and will keep our customers informed through regular updates on our website, Twitter, and direct communication."

But the regulators and Tesco Bank have been warned by a senior MP that they must take steps to ensure customers are protected from a similar attack.

"This is just the latest in a long list of failures and breaches of banking IT systems, exposing many thousands of customers to uncertainty and disruption," said Andrew Tyrie, chairman of the Treasury Committee. "We can't carry on like this."

Refund rules

UK bank customers have had money stolen from their online accounts by criminals before.

Last year, the NCA warned internet users to protect themselves against a strain of malicious software, which had enabled criminals to steal an estimated £20m from UK bank accounts.

The Financial Conduct Authority says banks must refund unauthorised payments immediately, unless they have evidence that the customer was at fault or the payment was more than 13 months ago.

Banks are also required to refund any charges or interest added to your account as a result of the fraudulent payments.

Tesco Bank has been owned by Tesco plc since 2008, after starting as a joint venture with Royal Bank of Scotland.

Shares in Tesco are down 1% amid predictions that the brand could be damaged by the security breach.