torrijos , who died in a plane crash in 1981 , achieved in 1977 with his diplomatic and political ability the signing of an agreement , under which the united states must pull out its troops from panama and return to panamanian sovereignty the panama canal by december 31 , 1999 to end its more than 80 years of occupation .