Dragon Ball Z came first. In terms of story, the two are essentially identical—Kai is simply a re-edited, remastered version of the original series, tightened up with fewer filler episodes and cleaner animation. So while Kai arrived later, it tells the same tale.