[1] In 1689 he returned to Spain, where King Charles II appointed him Ambassador to Portugal, a position that Arias declined, citing his newly acquired religious status, as he had just entered the Order of Saint Jerome.
In April 1699, as a result of a popular revolt that occurred in Madrid, known as the Mutiny of the cats (Los Gatos), in which the Count of Oropesa was deposed from the presidency of Castile, Arias was recalled to replace him.
During the King's absences in the War of Spanish Succession, Arias was a member of the governing council that assisted Queen Elisabeth Farnese.
He held this position until the intrigues of the Count of Montellano, José de Solís y Valderrábano, led to his removal from Court in November 1703.
[2] He was created Cardinal in pectore by Pope Clement XI in the consistory of 18 May 1712, and his appointment was made public on 30 January 1713, although he never travelled to Rome to receive the title.