We don't know how the painting arrived at the hands of the 7th Duke of Berwick and 14th Duke of Alba, Carlos Miguel Fitz-James Stuart, after the death of the 13th Duchess of Alba. It is not on the list of the 32 paintings handed over by the heirs of assets not linked to the 14th Duke of Alba. That's why Ángel M. de Barcia suspects that it was bought. The first mention of him is found in the Note of the paintings that exist in the Gallery of the Duke of Berwick (no year, datable around 1825) with number 4 (“The Duchess of Alba by Goya”..., the exact measurements follow).
Several copies of this portrait are known, but of much lower quality, none, of course, by Goya. See the one published as de Esteve, by Martín S. Soria, in the monograph dedicated to this painter.