in 1399 jadwiga of poland and her newborn died in childbirth. jogaila's power in poland was jeopardised as he was a foreigner king with no other ties to the throne but his wife. also, the defeat at vorskla forced a re-evaluation of the relationship between poland and lithuania. the result was the union of vilnius and radom in 1401. vytautas was granted wide autonomy, but after his death the title and powers of grand duke of lithuania were to be transferred to the king of poland. in case jagiełło died first without an heir, the polish nobility agreed not to elect a new king without consulting vytautas. the unique feature of this union was that the lithuanian nobility presented their own document: for the first time somebody other than dukes played a role in the state matters.