In the late 18th century, Bourbon-ruled Spain had an alliance with Bourbon-ruled France and therefore did not have to fear a land war. Its only serious enemy was Britain, which had a powerful Royal Navy; Spain, therefore, concentrated its resources on its Navy. When the French Revolution overthrew the Bourbons, a land war with France became a danger which the king tried to avoid. The Spanish Army was ill-prepared. The officer corps was selected primarily on the basis of royal patronage, rather than merit. About a third of the junior officers had been promoted from the ranks, and they did have talent, but they had few opportunities for promotion or leadership. The rank-and-file were poorly trained peasants. Elite units included foreign regiments of Irishmen, Italians, Swiss, and Walloons, in addition to elite artillery and engineering units. Equipment was old-fashioned and in disrepair. The army lacked its own horses, oxen, and mules for transportation, so these auxiliaries were operated by civilians, who might run away if conditions looked bad. In combat, small units fought well, but their old-fashioned tactics were hard of use against the French Grande Armée, despite repeated desperate efforts at last-minute reform. When war broke out with France in 1808, the army was deeply unpopular. Leading generals were assassinated, and the army proved too incompetent to handle command and control. Junior officers from peasant families deserted and went over to the insurgents; many units disintegrated. Spain was unable to mobilize its artillery or cavalry. The Spain of the end of the XVIII century was dominated by the complex personality of Manuel Godoy.