Although not himself a courtier, he was backed at court by Sosthene de la Rochefoucauld and Madame du Cayla, and in 1822 Louis XVIII gave him the title of count and made him formally prime minister. He immediately proceeded to muzzle opposition by stringent press laws, and the discovery of minor liberal conspiracies afforded an excuse for further repression. Forced against his will into interference in Spain by Mathieu de Montmorency and Chateaubriand, he contrived to reap some credit for the monarchy from the successful campaign of 1823.