Sudan was embroiled in two prolonged civil wars during most of the remainder of the 20th century .