Spanish wealth in 1700
In 1700 Spain was an empire with widespread possessions. It had been very wealthy, but high fiscal pressure, money tampering and general mismanagement had ruined its economy, resulting in a population loss of about 25% from 1600 to 1700 in mainland Spain. The population of its colonial empire had grown substantially, but trade to this empire had largely been taken over by other powers, meaning that its wealth did not end up in the peninsula. All this had its effect on the armed forces, which by 1700 could no longer be relied upon to keep enemies of the Spanish soil.
Spanish administrative goals in 1700
In the matter of the succession of Charles II the goal of the Spanish elite was not to let the empire be divided. For the nobility the empire provided a lot of career opportunities and part of the nobility in Madrid was itself of foreign origin, meaning that this part would loose the connection to its homeland. For the civilian elite division would mean the loss of economic connections and opportunities to trade.
Any new Spanish king who wanted to remain on the Spanish thrones would need to strive for some administrative goals. The primary goal would be to clear up the financial chaos, because in 1700 even the insight into the government's financial position was absent. Taxation had to made more bearable for those who did pay and applicable to those who did not pay. With that a financial basis could be created to support the military. Felipe V did achieve a lot in this and in the end the nobility and population of Castile united behind him. Their efforts would prove decisive in preventing the alliance from conquering Spain.
The Spanish party and the French party in Madrid
The whole subject of Spanish politics during the war of the Spanish Succession is dominated by the struggle between the French party and the 'Spanish' party in Madrid. The French party was led by Louis XIV, who wanted to govern Spain from Versailles through his ambassador. The 'Spanish national' parties were first dominated by the grandees and then by the Princess Des Ursins.
This power struggle was very much determined by the abilities of the persons involved. The weak personality of Felipe was a determining factor in allowing the influence of Louis and Des Ursins. Portocarrero was a man able to give directions to a government but was not able to stand up to the challenges the young Spanish court faced. The power hungry Princess Des Ursins was able to organise an effective government but overstepped herself at certain moments. It was proven that the assumption that his grandchild would listen to his Louis was right. It was however also proven that a king of Spain would not listen for very long to a family member hundreds of kilometers from his court.
Philip soon became a Spaniard, gave up his far from imaginary rights to the French throne, and proved the whole of Europe (including France) wrong in its assumption that Spain would only serve the interests of Louis XIV and France. After the war Spain started out on a policy that went against French interests. When it later sided with France against England this had more to do with British aggression against its colonial interests than with interests of France. A Habsburg king would probably have done the same.