This is true in greater generality. If $M$ and $N$ are locally compact, and the fibers of $f$ are compact connected and $f$ is a quotient map then f is proper. This falls under the rubric of monotone light factorization. Look at the book of G.T. Whyburn and E. Duda titled Dynamic Topology. Monotone Light factorization says if a map between locally compact Hausdorff has the property, that all connected components of all fibers are compact, then the map can be factored as a proper map onto a space with connected fibers and this space maps to the co-domain with totally disconnected fibers. Thanks to Dan Petersen and Richard Andrade for correction.
Addendum:
Let a connected component of the fiber of a map be called a level.Suppose X and Y are locally compact Hausdorff spaces and F a continuous map such that all levels are compact .Suppose the equivalence relation R on X is given by saying x and y are equivalent if they lie in the same level, then R is a proper equivalence relation
and the map from X to X/R is proper with connected fibers and F factors through X/R to Y as a map with totally disconnected fibers . In the case of the question of
the OP the equivalence relation R and the one given by f coincide and therefore the map is proper