Inherited from Old Spanish viuda, vibda, bibda, biuda, from Latin vidua, following metathesis.
The Spanish word may have had some later influence from the Latin in the Middle Ages; compare the strictly popular Old Spanish form viuva, which is the form also found in Portuguese and Old Catalan, deriving from a Latin *viduva.