Full Idea
Once people experience committing wrong and suffering it, they see the disadvantages are unavoidable and the benefits unobtainable, ...so they enter into a contract, guaranteeing no permitting or receiving wrong, ...and they then make laws and decrees.
Gist of Idea
After a taste of mutual harm, men make a legal contract to avoid it
Source
Plato (The Republic [c.371 BCE], 359a)
Book Reference
Plato: 'Republic', ed/tr. Waterfield,Robin [OUP 1993], p.46
A Reaction
This seems to be the earliest statement of the social contract idea. Here it both sets up the state and creates morality. This is Glaucon speaking, and is NOT endorsed by Socrates.
Related Idea
Idea 19946 Morality is a compromise, showing restraint, to avoid suffering wrong without compensation [Plato]