The US president’s threats of economic pressure had pushed the two nations to halt fighting along their disputed border.