Victor Hugo said this quote

History has its truth, and so has legend. Legendary truth is of another nature than historical truth. Legendary truth is invention whose result is reality. Furthermore, history and legend have the same goal; to depict eternal man beneath momentary man.