The doubtful allegiance of the Dalmatians tended to protract the struggle between Venice and Hungary, which was further complicated by internal discord due largely to the spread of the "Bogomil heresy", and by many outside influences.