what does contract of medina mean