SAN FRANCISCO — Apple's widely used iTunes and app stores suffered a rare breakdown Wednesday, frustrating millions of music lovers and mobile device owners around the world.

The outages were still vexing the iPhone and iPad as of 1:30 p.m. Eastern time, based on status updates posed by Apple Inc. By then, the both the iTunes and app stores had been inaccessible for several hours to the exasperation of Apple users venting on social media and online forums.

Apple apologized for the inconvenience, blaming the problem on an internal error affecting the system for directing online traffic. The Cupertino, California, company said it was working to restore service as soon as possible.

Besides the iTunes and mobile app stores, Apple's online book store and app store for its Mac computers weren't working either.

The disruption affects some of the world's most widely used — and most profitable services.

About 800 million accounts with credit cards linked to them have been set up on Apple's iTunes store since it opened in 2003 to sell digital music for the company's iPods.

More than 75 billion apps have been downloaded from the store that Apple opened in 2008 for the iPhone and, later, the iPad. Many of those apps charge a fee, or generate revenue from purchases of other services while people are using the program.

Last year, Apple's revenue from its iTunes, app, iBook, Mac app stores and other services totaled $18.5 billion, or an average of $50 million per day. That's still a small fraction of Apple's total revenue of $200 billion during that period.

The outages also will cut into the sale mobile app developers who keep most of the revenue from the programs sold in the app store. Last year alone, Apple distributed $10 billion to mobile app developers, an average of about $27 million per day.

The global outage comes two day after the company unveiled its latest gadget, the Apple Watch.

Apple is hoping to attract even more traffic to its app store next month when the smart watch goes on sale.