Pakistan, UK finalise agreement to tackle illegal migration