When Sayyiduna Ali (may Allah be pleased with him) would set out on a journey, he would keep traveling until the sun had set and darkness had fallen. Then he would dismount and perform the Maghrib prayer at its last time, and immediately after that, he would perform the Isha prayer at its earliest time. He would say that he had seen the Prophet (peace and blessings of Allah be upon him) do the same.