in truth the groundwork for the accords had been laid across the entire nineteenth century , beginning with the historic european downworlder treaty that was signed at the end of the napoleonic wars in 1815 and marked the first time an official document promised any protection under the law for downworlders .