Mobile operator O2 has said its data networks have been restored after a day of disruption for smartphone users.

A statement on its website, published early on Friday, said the 4G network was working again, having been affected from about 05:30 GMT on Thursday.

It said the slower 3G data service had been reinstated on Thursday evening.

Earlier O2 and mobile network equipment supplier Ericsson issued a joint apology to the millions of customers hit by disruption to its data services.

O2 has 25 million users and also provides services for the Sky, Tesco, Giffgaff and Lycamobile networks, which have another seven million users.

Services such as bus timetable information were also been affected, while many businesses faced disruption.

'Poor experience'
Ericsson UK boss Marielle Lindgren said the "faulty software" that had caused the issues was being decommissioned.

In a joint statement, O2 boss Mark Evans said: "I want to let our customers know how sorry I am for the impact our network data issue has had on them, and reassure them that our teams, together with Ericsson, are doing everything we can.

"We fully appreciate it's been a poor experience and we are really sorry."

Ericsson said there had been network disruption for customers in multiple countries.

Knock-on effects
Earlier, Ericsson president Börje Ekholm gave more detail about the cause of the disruption.

He said "an initial root cause analysis" had indicated that the "main issue was an expired certificate in the software versions installed with these customers".

The company was carrying out "a complete and comprehensive root cause analysis", he added.

Japan's Y!Mobile network, owned by Softbank, was also affected by the outages.

Network down: how people are coping without a signal
O2 is owned by Spain's Telefonica and has the UK's second-largest mobile network after EE, which is part of BT.

The company said voice calls were not affected by the problem, but some O2 customers said they could not make calls or send texts either.

The outage had knock-on effects for other services that use the O2 network, including Transport for London's electronic timetable service at bus stops, which stopped working.

Tom Morrod at market research firm IHS Markit said data was increasingly important to consumers, with half of UK mobile users prioritising internet connectivity above calls and texts.

"As well as the inconvenience to consumers and the associated frustration, having a major network out of action creates productivity challenges for businesses.

"Many businesses will have employees commuting or out in the field that have lost work time," he said.

On Thursday, several O2 customers described the effects the outage was having.

Allison Rose-Mannall, from Norwich, is an insulin-dependent diabetic who relies on her mobile and was unable to get to a landline.

"I'm disabled ... I'm in a wheelchair," she told the BBC. "So having no data but also no calls as well means I can't contact anyone if I have a fall or if I need anything."

Lynsey Greaves runs a company in Doncaster providing home visits to the elderly and vulnerable. Her 130 staff all rely on O2 phones to access rotas, schedules, names and addresses. She called in extra office staff to give out the information for each visit over the phone.

"There are nine of us trying to sort it now," she said. "It's been a nightmare."

Luke Stagg runs a plumbing business and depends on his phone, but he couldn't get through to customers or use his sat nav.

"That's a whole day wasted," he said. "I'll be seeking to recoup my losses, especially as a business customer."

Mischa Bittar is also a plumber. He said he had been "unable to contact any of my engineers or customers via email, unable to use our mobile systems to contact any engineers at all, so everyone's just had to down tools today".

"A lot of money lost and the first thing I know about it is via the BBC website, no contact from O2 at all, disappointing," he added.

Omeran Amirat said he had been a loyal O2 customer for a long time. He said he had bids on eBay on Thursday morning but he could not do them because the O2 network was down. "It's Christmas, the budget's tight for me, there were presents I was supposed to be buying for my daughter and my son on eBay today. They've gone now."

He said he had lost the bids and "O2 are responsible".

Can I claim compensation?
Customers of O2 will be able to claim for any out-of-pocket expenses that resulted from being without their phone, according to consumer expert Helen Dewdney.

Ms Dewdney, who writes a blog called The Complaining Cow, said users should be able to claim under the Consumer Rights Act 2015, which states that services should be carried out with reasonable skill and care.

That means customers would be able to claim a refund for what they would pay on a contract for the time they were without the use of the phone. They could also claim consequential loss due to breach of contract, for example, if they incurred bank charges because they were unable to move their money, or the cost of having to use a payphone.

This must be a genuine loss which can be proved with evidence. So, a taxi driver might be able to prove they lost out on fares owing to the shutdown, but other workers trying to claim a lost day of employment would struggle.

Ms Dewdney suggested phone users calculated their losses, and wrote to O2 with the evidence. They should state what they wanted as redress and mention the Consumer Rights Act 2015.

If they felt the response was unsatisfactory, it could be referred to Ombudsman Services: Communications of which O2 is a member. The customer would need to ask for a deadlock letter or wait eight weeks from the beginning of the complaint.