Ramadan: If the Prophet Muhammad was illiterate...?

Then how come before he died he asked Abu Bakr to get him a paper and pencil to write down the successor? Does that make any sense? If the Prophet was actually illiterate even after he died, then Imam Ali is not the first successor. Am I right?
Update: @ Muhammad the adorable Teddy Bear -

I'm pretty darn sure he did not.
Update 2: Pedram السلام عليك يا رسول الله - I'm pretty sure that Angel Gabriel memorized the Prophet the Quran and the Prophet told people who knew how to read and write the words. If I am wrong, correct me please.
Update 3: I am sorry, Umar*
16 answers 16