After two peaceful centuries, and even an alliance during the Mongol invasions of Vietnam, tensions erupted once more due to the continued influx of Vietnamese settlers marching southward. Mistrust of the Vietnamese, which was prominent in the Cham court, led to a bloodier conflict from 1367 to 1396, in which the Cham nearly conquered Đại Việt, but which ended in stalemate. After the war, the Trần dynasty was weakened and toppled by the Hồ dynasty, at which point the Chams allied with China once more, helping the Ming dynasty to conquer Vietnam in 1407. This, however, proved to be detrimental for Champa, as the Vietnamese held strong resentment toward the Cham after expelling the Chinese in 1427.