After being baptized by John the Baptist, Jesus fasted for 40 days and nights in the Judaean Desert. During this time, Satan appeared to Jesus and tried to tempt him.