The Bible tells us that at the very moment of Christ's apparent defeat on the cross He won the battle for the earth and the souls of man.
"Now is the judgment of this world; now the ruler of this world will be cast out. And I, if I am lifted up from the earth, will draw all peoples to Myself" John 12:31-32