The Treaty of Amritsar (1809) was a crucial agreement that maintained peace between Ranjit Singh and the British for nearly three decades, allowing Ranjit Singh to consolidate power north of the Sutlej.