Suddenly my iPhone 4S turned off. Upon restarting it, the Apple logo shows for a few seconds, then disappears after a fade to decreased brightness and stripes on the screen (looks like a display failure of some sort). It then boots again, without me touching it. This continues until I shut it off by holding down the Home and Power buttons simultaneously.
If I connected it to the computer while having iTunes open, it successfully booted and worked fine. I waited until it was fully charged, then removed it. It turned off again, spiraling into the same boot loop as before.
I did some reading here: http://support.apple.com/kb/HT1808 and gave it a try by putting it in recovery mode. Then I tried restoring it, but as soon as the progress bar pops up on my iPhone, it shuts off. I get iTunes error '9'. It reboots and is once again in recovery mode.
I have no idea what's going on. It appears to be unrelated to my computer. Any suggestions? I live in Denmark and Apple support here isn't exactly great.
I'm on a Mac with the latest version of iTunes. I was running iOS 6.0 when it stopped working.