Online gambling firm 888 is to pay a record penalty of £7.8m after it failed to protect vulnerable customers.
The Gambling Commission said there were "significant flaws" in the firm's social responsibility processes.
The regulator highlighted a technical failure which meant 7,000 customers who had chosen to bar themselves from their 888 accounts were still able to gamble.
Another customer bet more than £1.3m over 13 months before he was identified as having a problem.
888 said it had been working co-operatively with the regulator throughout the review, resulting in the voluntary settlement, adding it was "committed to providing players with a responsible as well as enjoyable gaming experience".
Sarah Harrison, chief executive at the Gambling Commission, said the penalty would ensure that "lessons are learnt".
Part of the penalty package will be used to repay £3.5m in deposits made by the customers who had self-excluded themselves when they wanted to stop gambling. A technical flaw meant that they were still able to gamble on 888's bingo platform.
"Our requirements are that every company must provide the facility for every customer to be able to bar themselves from gambling. These 7,000 looked to do that. But 888 didn't deliver it as effectively as they should have done," Ms Harrison told the BBC.
The regulator also pointed to one individual case in which a customer staked more than £1.3m, including £55,000 stolen from their employer. The customer in question gambled for three to four hours a day, over 13 months, placing a large number of bets.
The Gambling Commission said "the lack of interaction with the customer, given the frequency, duration and sums of money involved in the gambling, raised serious concerns about 888's safeguarding of customers at-risk of gambling harm".
Part of the penalty package - £62,000 - will be returned to the employer from whom money was taken.
Another £4.25m will be paid to a socially responsible cause to invest in measures to tackle gambling-related harm.
"There are around two million people now in Britain who either are problem gamblers or are at risk of problem gambling," Ms Harrison said.
"Companies are beginning to put different practices in place to identify people right up front, but more needs to be done. We need to go further and we need to go faster."
How do we know there are "two million people in Britain who are either problem gamblers or are at risk of problem gambling"?
The figure comes from a Gambling Commission report in 2015 based on 15,000 responses to a survey in Great Britain.
They use the Problem Gambling Severity Index (PGSI) to identify people at risk of gambling problems.
- 2.8% of people were at low risk = 1,430,000 people
- 1.1% at moderate risk = 555,000 people
The PGSI asks nine questions with four possible answers to give you a score, from "never" (0) to "almost always" (3). You only need to score one point to qualify as "low risk" which means you could say you "sometimes" "felt guilty about the way you gamble or what happens when you gamble" to be counted.
When calculating the number of "problem gamblers" the report gives a range from 300,000 to 430,000 people.
Even taking the lower figure in this range, combining the "at risk" and the "problem" gamblers gives us 2,285,000.
The chief executive of rival betting company Ladbrokes Coral told the BBC that the whole sector was in the process of learning how best to manage the problem of vulnerable gamblers.
"We have a responsibility to look after our customers. Ladbrokes Coral are also on that journey and there are issues that we've found in the past. But we are working with the Gambling Commission," said Jim Mullen.
"So there's no pushback from Ladbrokes Coral on making sure we can provide a safer environment for gamblers".
Ladbrokes Coral published half yearly results on Thursday which showed a 7% rise in profits. The company saw a fall in bets placed in shops but a 17% rise in online revenues.
The firm has been trying to strengthen its online gambling offering as the UK government considers introducing tougher rules for fixed odds betting terminals, which would have a further impact on its High Street retail operations.