How was the magnetosphere created?