2005 Nissan Pathfinder shuts off, shows battery and engine lights

While driving, the vehicle suddenly goes off showing both engine and batter symbols.
The engine starts after a couple of minutes of ignition been turn off and allowed to rest.

When it shuts off and you try to start it, does it crank and fail to start? Or does it not even crank?

It crank but failed to start, after leaving it off for some minutes the engine start and working again. At time some sound as if the pointer is on.

The pointer? Do you mean the tachometer (RPM meter?)

One heat-related cause of cranks-but-doesn’t-start is the crankshaft position sensor most cars have now, or the similar pickup coil inside the distributor on older designs. Good luck and please keep us informed.

I mean traficator noise, thank you I will get the position sensor replaced and hopefully the problem solved. Will keep you inform of the outcome.

My diagnosis may or may not be correct. Is there a mechanic you trust? If so, describe the symptoms. There may be other explanations. I am just an amateur.