It is narrated from Sayyiduna Ibn Abbas (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) said: "Indeed the first thing that Allah Almighty created was the Pen, and Allah Almighty commanded it to write (the decree of) everything."