The first modern political parties were liberals, organized by the middle class in the 19th century to protect them against the aristocracy. They were major political parties in that century, but declined in the twentieth century as first the working class came to support socialist parties and economic and social change eroded their middle class base. Conservative parties arose in opposition to liberals in order to defend aristocratic privilege, but in order to attract voters they became less doctrinaire than liberals. However, they were unsuccessful in most countries and generally have been able to achieve power only through cooperation with other parties.