We use the Smaller Alignment Index (SALI) to distinguish rapidly and with certainty between ordered and chaotic motion in Hamiltonian flows. This distinction is based on the different behavior of the SALI for the two cases: the index fluctuates around non--zero values for ordered orbits, while it tends rapidly to zero for chaotic orbits. We present a detailed study of SALI's behavior for chaotic orbits and show that in this case the SALI exponentially converges to zero, following a time rate depending on the difference of the two largest Lyapunov exponents
, i.e. . Exploiting the advantages of the SALI method, we
demonstrate how one can rapidly identify even tiny regions of order or chaos in
the phase space of Hamiltonian systems of 2 and 3 degrees of freedom.