Early critics developed the argument that The Spanish Viceroy was a play about the Count of Gondomar, the diplomat who had served as Spain's ambassador to England to 1622.
A more modern and perhaps more plausible hypothesis suggests that The Spanish Viceroy was about Pedro Giron, Duke of Osuna, who had served as the viceroy of Sicily and Naples.