The dispute over the islands has prevented the two countries from signing a peace treaty officially ending the war .