The United Kingdom occupied Egypt in 1882 due to interests in the Suez Canal, which led them to conquer Sudan from 1896-1898 and confront French forces in Fashoda in 1898 to control the Nile Valley. In 1919, Egypt's nationalist Wafd party unsuccessfully tried for independence. Egypt gained independent status in 1922, though Britain maintained military and communications control until 1936, when a treaty was signed granting Egypt full independence while reserving British control of the Suez Canal.