1988 b-2200 mazda

motor dies when i apply the brakes to come to a stop. What could it be?