We investigate the scattering of edge channels by a magnetic quantum dot. which is formed by two different magnetic fields B* and B-0 inside and outside the dot, respectively, in a quantum wire. We calculate the two-terminal conductance (G) of the wire and find that for gamma (=B*/B-0) > 0, G is quantized. while for gamma < 0 it is not quantized, This feature results from the different magnetic confinements, caused by nonuniform magnetic fields, between the two cases. (C) 2002 Elsevier Science B.V. All rights reserved.