The nations have agreed to an internationally mediated agreement sparking scenes of celebrations in Kashmir.