The chief executive of TalkTalk, a British telecommunications provider, said on Friday that she had received a ransom demand from hackers who had claimed responsibility for stealing data on some of the company’s four million customers.

TalkTalk, which offers cable and fixed-line services in Britain, said local authorities had opened a criminal investigation into the widespread data breach. The hackers may have gained access to personal data on the company’s customers, including sensitive information like credit card details, dates of birth and addresses.

“Yes, we have been contacted, by I don’t know whether it’s an individual or a group purporting to be the hacker,” Dido Harding, TalkTalk’s chief executive, told the BBC.

Ms. Harding did not provide further details on who the hackers could be.

Blair Bishop, a TalkTalk spokeswoman, confirmed that the company had been contacted by someone claiming responsibility and seeking payment.