The Treaty of Amritsar was signed in 1809 as the Napoleonic threat receded.