The First Order launched an attack on the Resistance fleet during the First Order–Resistance war following the evacuation of D’Qar.
The First Order managed to track the Resistance fleet through hyperspace, forcing the Resistance to flee in search of a way of escape before their fuel supplies ran out within 18 hours.