Down relegated Westmeath in a thrilling match that had all of the drama, quality and anxiety of an important championship tie.