2005 Chevy Classic not firing

Lately my 2005 Chevy Classic (Malibu) has not been starting consistently. It runs fine for days but then out of nowhere will just turn and turn without firing. It has stalled on me twice now, both while driving near idle speed. The first time it started right back up when I put it in neutral, the second it would not start. The battery is brand new.

I’ve brought it to my mechanic twice now after getting stranded but they have been able to start it every time and aren’t able to find the problem. Both times I’ve brought it to them it’s been late in the day and I’m sure they didn’t try to start it until the next day.

Since it starts most of the time and is an intermittent problem I wonder if it’s a loose connection, or maybe a problem with the anti-theft system.

Any ideas?