By 1805 , Spain was once more aligned with France , and Spanish ships fought alongside the French against Nelson at Trafalgar .
France and Spain were at war in 1805 and their ships engaged in battle with each other .