A magnetic needle is kept in a non-uniform magnetic field. It experiences: