Intense fighting in the region had sparked fears of a direct conflict between the two countries.