The king's domestic policy was almost wholly fruitful of good. Under his direction many useful public works were carried out— roads, bridges and large schemes of drainage. The first reforms undertaken had provoked a disturbance in Madrid directed against the king's favourite minister, the Sicilian marquis of Squillacci. Charles, who believed that the Jesuits had promoted the out break, and also that they had organized a murder plot against him, allowed his minister Aranda (q.v.), the correspondent of Voltaire, to expel the order in•1766, and exerted his whole in fluence to secure its entire suppression. The new spirit was also shown by the restrictions imposed on the numbers of the religious orders and on the Inquisition. On the other hand the shipping and the industry of Spain increased greatly. The population made a considerable advance, and, under the enlightened bureaucratic rule of Florida-blanca, the sloth and ignorance which had settled on Spain in the end of the 17th century was lifted.
This bellicose policy, however, brought him into collision with the queen with the result that Floridablanca and his friends, and shortly afterwards the veteran Aranda also, were set aside and the favourite Emmanuel Godoy obtained the direction of affairs.
Godoy, who had recently received the title of duke of Alcudia, and who was at once the queen's lover and the personal favourite of the king, had no experience of the routine of office, and no settled policy : but the course to be pursued was decided for him. The execution of Louis XVI. (Jan. 21, 1793) made a profound impression in Spain. Charles IV. was roused to demand vengeance for the insult to his family, and the Spanish monarchy became an enthusiastic member of the first coalition against France. But the campaign undertaken mainly in Roussillon was a failure; the Spaniards were driven from the strong fortresses that guarded the Pyrenees, whilst the French advanced almost to the Ebro.
The queen and Godoy hastened to follow the example set by Prussia, and concluded the Treaty of Basle with France (1795).
But the moderation of this treaty was only a flimsy disguise of the disgrace that it involved. Spain found herself tied hand and foot to the French republic. Godoy had to satisfy his allies by the encouragement of reforms which both he and his mistress loathed, and in 1796 the veil was removed by the conclusion of the Treaty of San Ildefonso. This was a virtual renewal of the "Family Compact" of 1761, but with terms far more disadvan tageous to Spain. The real object of the treaty was cynically avowed in the i8th article, by which, during the present war, the Spanish obligations were only to apply to the quarrel between Great Britain and France. A scheme was prepared for a joint attack on the English coast, but it was foiled by the battle of St. Vincent (q.v.), in which Jervis and Nelson forced the Span ish fleet to retire to Cadiz. Great Britain seized the opportunity to encourage discontent in the Spanish colonies.
It was in vain that Godoy sought to secure the friendship of the reforming party by giving office to two of its most prominent members, Jovellanos and Saavedra. Spanish pride and religious sentiment were offended by the French occupation of Rome and the erection of a republic in the place of the papal Government. The treatment of the duke of Parma by the Directory was keenly resented by the queen. Godoy found himself between two parties who agreed only in their hatred of him, and in March 1798 he was compelled to resign his office. Godoy's office was entrusted to Saavedra, but the reformers did not obtain the advantages which they expected from the change. During Napoleon's absence in Egypt the second coalition gained successes in 1799 which had seemed impossible since 1793.