Maytag washer stops working

I have a problem with my Maytag washer just stop after the agitate cycle. The timer keeps going but the cycle has stopped so that when the timer says the washer is finished running the washer is still full of water. After waiting about 30 minutes the washer will run the load to completion. I also notice a smell like its overheating. Is there an overheat shutoff or could it be the timer?