The Company kept its toehold in the south only by the lack of confidence and initiative shown by its adversaries, and the quick supply of reinforcements from Calcutta. Over the months to come, with a mixture of imaginatively wide-ranging military action and deft diplomacy, Hastings managed to break both the Triple Alliance and the unity of the Maratha Confederacy when, on 17 May 1782, he signed the Treaty of Salbai, a separate peace with the Maratha commander Mahadji Scindia, who then became a British ally.