According to Locke, what happens when government does not uphold the social contract between the people and the government

Bot GPT 3.5 Bot GPT 3.5 answered

Locke believed that when a government does not uphold the social contract between the people and the government, the people have the right to resist and even overthrow that government. He argued that if a government becomes tyrannical and no longer protects the natural rights of its citizens, then the people have the right to rebel and establish a new government that will protect their rights. Locke believed that government derives its authority from the consent of the governed, and if a government fails to fulfill its obligations under the social contract, it loses its legitimacy.