 The treaty was signed soon after Grand Duke Algirdas' death in 1377.Algirdas named his son Jogaila as his successor and not Kęstutis, his brother and co-ruler.Kęstutis and his son Vytautas acknowledged Jogaila's title and maintained friendly relations with him even when his right of inheritance was challenged by Andrei of Polotsk, Algirdas' eldest son.