How Long Should We Stay in Mina?

What is the ruling regarding one who remains in Mina until midnight, then leaves for Mecca and does not return until after Fajr?

If the time is midnight, then that is the middle of the night in Mina and in that case there is no harm in leaving Mina after this time, even though it is better to remain in Mina the day and night.

However, if the time is midnight before the middle of the night, then do not leave because the condition for remaining in Mina is to spend most of the night there as has been mentioned by our Fuqaha', may Allah have Mercy upon them.

Sheikh Ibn Uthaymeen