PANAMA CITY — Panama’s teachers will return to the classroom Tuesday after a month-long strike supported by a number of other sectors that blocked commerce and snarled the capital with traffic over the high cost of living and government corruption.

The teacher walkout started what became the largest social protest that Panama had seen in years. Educators said they were fed up with the soaring prices for gasoline, food and medicine and wanted more investment in education.

The teachers were eventually joined by construction workers and Indigenous groups, as well as frustrated average Panamanians. They erected highway roadblocks that froze supply routes and caused some shortages.

After more than a week of dialogue mediated by the Catholic Church, the government agreed to hold prices on dozens of basic consumer products and a lower cost for gasoline.

The government said it would create mechanisms for the direct purchase of medicines to avoid shortages plaguing public hospitals and promised to set maximum prices for 150 medicines.

The dialogue between protest groups and the government was scheduled to resume Wednesday. Several pending demands remain, including reducing the cost of electricity, increasing government transparency and reducing government corruption.

Before announcing the end to their strike Monday, teachers held a big rally in the capital.