Give a stream of consciousness and then the final answer. Colombia, France, and later the United States controlled the territory surrounding the canal during construction. The US continued to control the canal and surrounding Panama Canal Zone until the 1977 Torrijos -- Carter Treaties provided for handover to Panama. After a period of joint American -- Panamanian control, in 1999, the canal was taken over by the Panamanian government and is now managed and operated by the government-owned Panama Canal Authority.

Answer this question: when did panama canal go back to panama?
To answer the above question, the relevant sentence is: After a period of joint American -- Panamanian control, in 1999, the canal was taken over by the Panamanian government and is now managed and operated by the government-owned Panama Canal Authority.
So, the final answer is 1999.