For Locke, legitimate civil government is instituted by the explicit consent of those governed. Those who make this agreement transfer to the civil government their right of executing the law of nature and judging their own case. These are the powers which they give to the central government, and this is what makes the justice system of civil governments a legitimate function of such governments.
Ruth Grant has persuasively argued that the establishment of civil government is in effect a two step process. Universal consent is necessary to form a political community. Consent to join a community once given is binding and cannot be withdrawn. This makes political communities stable. Grant writes: "Having established that the membership in a community entails the obligation to abide by the will of the community, the question remains: Who rules?" (Grant, 1987 p. 115) The answer to this question is determined by majority rule. The point is that universal consent is necessary to establish a political community, majority consent to answer the question who is to rule such a community. Universal consent and majority consent are thus different in kind, not just in degree. Grant writes:
Locke's argument for the right of the majority is the theoretical ground for the distinction between duty to society and duty to government, the distinction that permits an argument for resistance without anarchy. When the designated government dissolves, men remain obligated to society acting through majority rule.