As part of a deal to end the war , the two nations agreed to form an independent boundary commission and that its decision would be final and binding .