This happened to my 2-years old iPhone 5 earlier while I was at work today, so I rushed to a nearby MAC Service Center and within 30 seconds, the guy diagnosed that it was caused by the battery. I didn't leave my phone because I still need to back-up the files in my iTunes library, but I'll be going back tomorrow to have it fixed. The thing is, I live in the Philippines, and I bought my iPhone in Dubai and my warranty's expired - so I don't know if they'll charge me for the repair, or if they'll give me a replacement phone :|