Mazda Protege stalls in hot weather

I have a 5 speed 1999 Mazda Protege. When the weather gets hot (above about 90) and I drive the car for more than about 30 minutes, the engine light comes on and the car starts to ‘hesitate’ and eventually stall. The temperature gauge never goes above normal. To restart the car, sometimes it is enough to jump start the battery. After cooling down, the check engine light goes off and the car is fine. Twice I have taken the car in to a mechanic, where I was told there was nothing wrong.

Anyone have any ideas?

When the check engine light comes on, the car will store a code related as to why it is misbehaving. As long as you don’t disconnect the battery, that code will be stored, even if the light went back off. The code will most likely be a P with four digits behind it (ie P0100).
After it happens next time, go to pepboys, autozone or Advance: they’ll read that code for you for free. They may try to sell you service or parts, which you turn down.

Then report back here with those codes.
The actual problem could be many things. For instance, crank sensors are notorious for becoming heat sensitive but without knowing that code, we’d be guessing.

Also, if it indeed threw a code, don’t go back to that mechanic.
If there wasn’t a code, there’s not much he can do but if there was one, he should have had a clue.
If he didn’t tell you there was a code, he doesn’t want to help you. He likely just erased it and sent you on your way.
If he didn’t know to read it, he’s dangerously incompetent.

"To restart the car, sometimes it is enough to jump start the battery. "

I am wondering about just how long the OP plans on driving around with an extremely weak battery. Trust me–the battery is not going to magically resurrect itself if it has already needed to be jumped on multiple occasions.

In addition to following Remco’s good advice, I strongly suggest that the OP begin by replacing the battery and having the alternator output checked, as this problem could be due to a failing alternator and a weak battery.