I got some of the history in this post from an article written by my friend Eric Jackson several years ago.
I'm not a nationalist, and I think that flag worship is idolatry. I'm not one to get all excited about flags, although I will admit that I get upset when I see the Confederate flag. However, I do understand the importance of the nation's flag to nationalists.
The Canal Zone in Panama was a stretch of land which was considered U.S. property in perpetuity according to the Hay-Bunau Varilla Treaty. It split the nation of Panama in two and it was like separate country with its own police force, courts, post office and radio stations. Panamanians could only enter the Canal Zone with permission. In 1963, President of the U.S., John F. Kennedy, ordered that the Panamanian flag be flown next to the U.S. flag at all non-military sites in the Zone. He was assassinated before the order was carried out. The governor of the Canal Zone, Robert J. Fleming, Jr., decided to limit Kennedy's order by not flying either flag in front of civilian locations such as schools and post offices in the Zone. This upset many Zonians (U.S. citizens living in the Canal Zone) who saw this as an attempt to deny U.S. sovereignty over the Canal Zone. Some Zonians began demonstrating with the U.S. flag. Some students from Balboa High School in the Zone raised a U.S flag on the pole in front of the school. School authorities removed it and the students walked out of class and raised another flag and posted guards to protect it. On January 9, 1964, students at the Instituto Nacionál, just outside of the Canal Zone, heard about the actions of the Balboa High students and decided to make a statement regarding Panamanian sovereignty over the Canal Zone and, after informing their school principal and the Canal Zone authorities of their plans, about 150 to 200 students, led by Guillermo Guevara Paz, marched to Balboa High where they planned to hoist the Panamanian flag on the same pole as the Zonian students had hoisted the U.S. flag. At Balboa High, the Panamanian students were met by the Canal Zone police and Zonian adults and students. After negotiations with the police, a small group were allowed to approach the flag pole. The Zonians surrounded the students and the flag pole, started singing The Star Spangled Banner, rejected the deal made with the police and a scuffle broke out. The flag the Panamanian students were carrying (which had historical significance, having been carried in anti-U.S. protests in 1947) was torn in the scuffle. The police escorted the students back to where the rest of their group was standing.
Word of the incident spread through the city, and crowds began forming along the fence which separated the Canal Zone from Panama City. Some people ran into the Zone and planted Panamanian flags. Some people threw rocks and the police responded with tear gas and bullets. The Canal Zone authorities requested help from la Guardia Nacionál (Panama's Armed Forces) but the Guardia stayed away from the fighting. Some protesters began to tear down the fence between the Zone and Panama and the police responded with more tear gas and more gun fire. Soon Panamanians were shooting back. Riots broke out and U.S. owned businesses were torched. Ascanio Arosemena, a 20 year-old student, was the first to be martyred. He was helping evacuate wounded protesters when he was shot. A six-month-old girl, Maritza Avila Alabarca, died of respiratory problems when her neighborhood was gassed. All in all, 22 Panamanians died in the incident and are considered martyrs. They are: Ascanio Arosemena, Luis Bonilla, Josi Del Cid Cobos, Teofilo Belisario De La Torre, Gonzalo A. France, Victor M. Garibaldo, Josi Enrique Gil, Ezequiel Meneses Gonzalez, Victor M. Iglesias, Rosa Elena Landecho, Carlos Renato Lara, Evilio Lara, Gustavo Lara, Ricardo Murgas Villamonte, Alberto Nichols Constance, Estanislao Orobio W., Jacinto Palacios Cobos, Ovidio L. Saldana, Rodolfo Sanchez Benitez, Alberto Oriol Tejada and Celestino Villareta. This incident led to the end of the idea of the Canal Zone being U.S. property in perpetuity and led to the eventual closing of U.S. bases and the transfer of control of the Canal to Panamá.