A district organized under this title or title 10 must be fairly compensated for losses resulting from annexation by a city under chapter 40-51.2. If a district has outstanding bonds, the annexation proceedings must be in accordance with the bond resolution or trust indenture. The governing body of a city and the board of directors of the district may agree to terms that provide that the facilities owned by the district and located within the city must be retained by the district for the purpose of transporting water to customers outside the municipality.