Twitter said a "cascading bug" caused outages affecting millions of users of the wildly popular site, and dismissed claims of a hacker attack.
The outage led to a barrage of complaints and comments, some serious and others ironic, which the company said underscored "how critical Twitter has become."
The on-again-off-again service led to a range of speculation and one claim of a denial of service attack, but Twitter said this was unfounded.
In a blog post, Twitter vice president of engineering Mazen Rawashdeh said the company learned around 1600 GMT "that Twitter was inaccessible for all Web users, and mobile clients were not showing new tweets."
He said an investigation "found that there was a cascading bug in one of our infrastructure components. This wasn't due to a hack or our new office or Euro 2012 or GIF avatars (animation which is banned by Twitter), as some have speculated today."
Rawashdeh said a cascading bug "isn't confined to a particular software element, but rather its effect 'cascades' into other elements as well. One of the characteristics of such a bug is that it can have a significant impact on all users, worldwide, which was the case today.
"As soon as we discovered it, we took corrective actions, which included rolling back to a previous stable version of Twitter."
He said a "full recovery" was made after about two hours and that a "comprehensive review" was underway.
But the outage nonetheless provoked users to vent on other social media sites, and to tweet about it when Twitter came back up.
"Twitters broke, my life has no meaning anymore," one user wrote on the social media website Tumblr during the outage.
Another wrote, "OMG TWITTER BROKE. I feel so alone right now."
The outage caused many users to tweet about the experience when the site became accessible.
"My boss shut down Twitter because he wanted me to get back to work. Feel free to kill him if you want," one tweet said.
Another said: "Twitter went down, I looked up & was like, who are these people in my house? Turns out I have a wife & a daughter."
And still another tweeted: "Unlike my ex-wife, Twitter came crawling back."
On Facebook, a member wrote: "Be honest. Did you spend most of Twitter being down desperately trying to tweet about Twitter being down?"
When word of the bug surfaced, one Twitter member said, "Oh great. Now I have to ask my exterminator whether he has a poison for 'cascaded bugs.'"
Twitter put a positive spin on this by boasting about how important the site has become in getting news and updates out quickly.
"We know how critical Twitter has become for you -- for many of us," said Rawashdeh.
"Every day, we bring people closer to their heroes, causes, political movements, and much more."
He reposted a tweet from user Arghya Roychowdhury which said, "OMG..twitter was down....closest thing to living without oxygen for most of us...."
"It's imperative that we remain available around the world, and today we stumbled. For that we offer our most sincere apologies and hope you'll be able to breathe easier now," Rawashdeh said.
Just after the outage, one tweet claimed credit for a so-called denial of service attack.
"We just #TangoDown'd http://twitter.com for 40 minutes worldwide!" said a tweet from the group called UGNazi, which has been linked to attacks on US government websites.
The term "tango down" is used in the hacker community to refer to a so-called denial of service attack which can shut down a website.
Twitter, which allows its members to post brief comments, links or pictures, claims to have more than 140 million active users, with the largest number being in the United States.
A recent survey found one in seven Americans who go online use Twitter and eight percent do so every day.