Diplomats in the region have spent weeks trying to prevent a confrontation that they say risks a wider conflict.