Treaty of Lahore
The Anglo-Sikh Friendship was basically based upon the fact that “Enemy’s enemy is Friend”. There was fear on French attack by a coalition led by Napoleon and Zamanshah.
In this treaty both the parties (British and Sikhs) basically agreed to not shelter to each other’s enemy and not interfere with each other’s affairs. This friendship had lasted till death of Ranjit Singh in 1839.
The dilemma of Lord Auckland was that he could not afford the friendship of Dost Mohammad khan at the cost of Ranjit Singh. So he had two options.
One was to defer all the plans for Afghanistan
Other was to attack Afghanistan and force Dost Mohammad Khan out and impose a puppet government in Afghanistan which could hold Russians and Persians Back.
Lord Auckland chose the second option. Result was First Anglo Afghan War .