He [Ibn Abbas] said: "The first thing Allah created was the Pen. He said: 'Write.' It asked: 'My Lord, what shall I write?' He replied: 'Write what is to be.' So the Pen recorded everything that is to be until the Day of Resurrection."