Image caption O2 users were affected across the UK last week

Mobile phone firm O2 will give compensation to hundreds of thousands of its customers after its network stopped working last week.

The firm says customers who pay monthly will get back 10% of their July subscription, the equivalent of three days' charges, applied to their September bill.

Pay-as-you-go customers will get back 10% on their first top-up in September.

O2 said it recognised the failure had caused "inconvenience and frustration".

"We have now identified all those customers directly affected (those whose devices could not connect on our system) and we are giving them the equivalent of three days back for the disruption as a gesture of goodwill and to say sorry," the company said.

All customers, even those who were not affected, will also be given a £10 voucher to spend in one of its stores.

O2 admitted that about one third of its customers were affected by the network collapse.

Customers of Tesco Mobile, a service which shares O2's network, will also be given the compensation if they were affected.

"It was a highly unusual and unprecedented situation. However, we recognise the inconvenience and frustration felt by those affected," said a Tesco Mobile spokeswoman.

"As a gesture of goodwill and to say sorry, we are giving our customers the equivalent of three days back for the one-day network disruption."