sentences:  The territories of Allahabad and Kora were given to the emperor after the treaty was signed in 1765.He spent six years there and after the takeover of Delhi by the Marathas, left for his capital 
  in 1771.Upon realizing the Maratha intent of territorial encroachment, however, Shah Alam ordered his general Najaf Khan to drive them out.