Egypt lost the six-day war and had to sign the Camp David accords and peace treaty to regain the Sinai peninsula. In return it gave up upon part of its sovereignty needing consent of Israel on topics like arming of the border guard or wares that are allowed the crossing.