According to John Locke, social contract theory which government would be an illegal government

According to John Locke's social contract theory, any government that does not fulfill its obligation to protect the natural rights and liberties of its citizens would be considered an illegal government. Locke believed that the primary purpose of government is to protect people's life, liberty, and property. If a government infringes upon these rights or fails to maintain the consent of the governed, it would be seen as an illegal and illegitimate government in Locke's view.

According to John Locke's social contract theory, a government would be considered illegal if it violated the terms of the social contract.

Locke believed that individuals enter into a social contract with their consent, forming a government to establish and protect their natural rights to life, liberty, and property. The role of the government is to safeguard these rights and promote the common good.

If a government were to fail in fulfilling its obligations outlined in the social contract, it would be considered illegitimate according to Locke's theory. Specifically, if the government violates the fundamental rights of the citizens or becomes tyrannical, it could be deemed illegal. Locke argued that the people have the right to resist such a government and establish a new one that upholds the principles of the social contract.

In summary, according to Locke's social contract theory, a government would be considered illegal if it violated the terms of the social contract by infringing upon people's natural rights or acting tyrannically.