We study the problem of an electron in two dimensions in the presence
of a magnetic vortex with a steplike profile. Depending on the values
of the effective mass and gyromagnetic factor of the electron, it may
be trapped by the vortex. The bound-state spectrum is obtained numeric
ally, and some limiting cases are treated analytically.