In 1754 Wall was recalled from London to Madrid becoming Minister of Foreign Affairs, after the death of José de Carvajal.
 A few months later he played a part in driving Carvajal's successor the Marquess de La Ensenada from office, thereby also helping Huescar and the British Ambassador, Sir Benjamin Keene.
Wall served as Chief Minister until 1763, when the Duke of Grimaldi succeeded him.

The despatches of the British Minister, Sir Benjamin Keene, and those of his successor, George Hervey, 2nd Earl of Bristol, contain many references to General Wall.
They are creditable to him.
Though a constant partisan of peace and good relations with Britain, Wall was firm in asserting the rights of the government he served.
 During the early stages of the Seven Years' War (1756–63) he insisted on claiming compensation for the excesses of British privateers in Spanish waters.
He frequently complained to British officials about the difficulties which these adventurers' violence was causing.
As an expatriate, despite having previously represented the French Crown, he was often taunted by various French factions.

Wall himself was more concerned that Britain's colonial acquisitions from France could mean that Spain's South American Empire was threatened.
The new King Charles III (1759–88) retained Wall as Prime Minister.
 When Spain declared War in 1761, Wall as Prime Minister naturally carried out his King's decree, although he later confessed to Lord Bristol, the British Ambassador, some regret with the benefit of hindsight that he could see the failure of his efforts in preserving the peace.
The close relations between Charles III and the French Bourbon Kings later made General Wall’s position as Prime Minister very trying.
Yet King Charles, who detested changing his ministers, refused all Wall's requests to retire, till Wall exhorted himself in 1763 by elaborately affecting an imaginary eye disease.

Throughout his Spanish government service Wall built a network of relationships which survived his tenure for several decades perhaps even helping Spain during the following reign of King Charles IV.
Among the relationships he developed were those with: the Duke of Grimaldi, the Count of Aranda, the Count of Campomanes, Manuel de Roda, Cayetano Pignatelli, Marquess of Rubí as well as with various ambassadors from around Europe such as the Counts of Fuentes, and also with commissioners from the colonies, like Ambrosio de Funes Villalpando, Count of Ricla.

Among his committed Irish supporters were the engineer William Bowles (1720–84) who studied the geology of Spain, Pedro Fitz-James Stuart, the de Lacy family, Alejandro O'Reilly, Arnold later Lord Mahoney, Carlos McCarthy, Francis Nangle, Ambrosio O'Higgins and Bernard Ward.

Wall extended friendship and knowledge with others such as Francisco Pérez Bayer, Jose Clavijo y Fajardo, Benito Bails, Celestino Mutis, Jose Agustín de Llano y de la Cuadra (Spanish Ambassador to Vienna under Emperor Joseph II & nephew of one of Spain's First Secretaries of State), Sebastián de la Cuadra, 1st Marquis of Villarías, numerous members of Juan de Iriarte's family, Bernardino del Campo, Ambassador José Nicolás de Azara (a follower of William Bowles' work) and Juan de Chindulza.

He was elected a Fellow of the Royal Society in 1753.
In 1754 Wall was recalled from London to Madrid becoming Minister of Foreign Affairs, after the death of José de Carvajal.  A few months later he played a part in driving Carvajal's successor the Marquess de La Ensenada from office, thereby also helping Huescar and the British Ambassador, Sir Benjamin Keene. Wall served as Chief Minister until 1763, when the Duke of Grimaldi succeeded him.
The despatches of the British Minister, Sir Benjamin Keene, and those of his successor, George Hervey, 2nd Earl of Bristol, contain many references to General Wall. They are creditable to him. Though a constant partisan of peace and good relations with Britain, Wall was firm in asserting the rights of the government he served.  During the early stages of the Seven Years' War (1756–63) he insisted on claiming compensation for the excesses of British privateers in Spanish waters. He frequently complained to British officials about the difficulties which these adventurers' violence was causing. As an expatriate, despite having previously represented the French Crown, he was often taunted by various French factions. 
Wall himself was more concerned that Britain's colonial acquisitions from France could mean that Spain's South American Empire was threatened. The new King Charles III (1759–88) retained Wall as Prime Minister.  When Spain declared War in 1761, Wall as Prime Minister naturally carried out his King's decree, although he later confessed to Lord Bristol, the British Ambassador, some regret with the benefit of hindsight that he could see the failure of his efforts in preserving the peace. The close relations between Charles III and the French Bourbon Kings later made General Wall’s position as Prime Minister very trying. Yet King Charles, who detested changing his ministers, refused all Wall's requests to retire, till Wall exhorted himself in 1763 by elaborately affecting an imaginary eye disease.
Throughout his Spanish government service Wall built a network of relationships which survived his tenure for several decades perhaps even helping Spain during the following reign of King Charles IV. Among the relationships he developed were those with: the Duke of Grimaldi, the Count of Aranda, the Count of Campomanes, Manuel de Roda, Cayetano Pignatelli, Marquess of Rubí as well as with various ambassadors from around Europe such as the Counts of Fuentes, and also with commissioners from the colonies, like Ambrosio de Funes Villalpando, Count of Ricla. 
Among his committed Irish supporters were the engineer William Bowles (1720–84) who studied the geology of Spain, Pedro Fitz-James Stuart, the de Lacy family, Alejandro O'Reilly, Arnold later Lord Mahoney, Carlos McCarthy, Francis Nangle, Ambrosio O'Higgins and Bernard Ward.
Wall extended friendship and knowledge with others such as Francisco Pérez Bayer, Jose Clavijo y Fajardo, Benito Bails, Celestino Mutis, Jose Agustín de Llano y de la Cuadra (Spanish Ambassador to Vienna under Emperor Joseph II & nephew of one of Spain's First Secretaries of State), Sebastián de la Cuadra, 1st Marquis of Villarías, numerous members of Juan de Iriarte's family, Bernardino del Campo, Ambassador José Nicolás de Azara (a follower of William Bowles' work) and Juan de Chindulza.
He was elected a Fellow of the Royal Society in 1753.
Ricardo Wall