The Second Treaty of San Ildefonso was signed on 19 August 1796 between the Spanish Empire and the First French Republic. Based on the terms of the agreement, France and Spain would become allies and combine their forces against the Kingdom of Great Britain.