This year marks the 40th anniversary of the Civil Rights Act of 1964. The achievements of the civil-rights movement in bringing about a more just and equal society are undoubtedly well worth celebrating. However, these achievements have not come without costs. In particular, it’s worth pausing to consider the growing threat more recent and draconian anti-discrimination laws pose to American civil liberties.

While the civil-rights laws of the 1960s were generally sensitive to civil libertarian concerns, contemporary anti-discrimination laws often are not. For example, in deference to freedom of association and privacy considerations, the 1964 act prohibited discrimination only in public facilities such as restaurants, hotels and theaters. Newer laws, however, often prohibit discrimination in the membership policies of private organizations ranging from large national organizations like the Boy Scouts of America.

The framers of the 1964 act also were sensitive to religious freedom and wrote into the law a limited but important exemption for religious institutions. Many recently enacted state and local laws, however, contain no religious exemption. Moreover, courts have unnecessarily stretched the definition of “discrimination” to force religious groups and individuals to conform to secular social norms. For example, courts have required conservative Christian schools to retain teachers who become pregnant out of wedlock. The schools’ attempts to ensure their teachers are proper religious role models have been interpreted as invidious sex discrimination.

The authors of early federal civil-rights legislation also cabined the laws’ intrusions on civil liberties by limiting coverage to race, national origin, religion and, sometimes, sex. In the past two decades, however, the federal government has prohibited discrimination based on family status, age and disability in a variety of contexts. Meanwhile, state and local anti-discrimination laws go even further, covering the obese, the ugly and the body-pierced, cohabitating unmarried couples and even (in Minnesota) motorcycle gang members.

In yet another show of concern for civil liberties, Congress exempted landlords from the 1968 Fair Housing Act, if they rented four or fewer units and lived on the premises. This “Mrs. Murphy exception” is a reasonable compromise between the goals of anti-discrimination law and privacy concerns.

Recently, however, the laws of several jurisdictions have been interpreted to ban discrimination in the selection of roommates.

Federal civil-rights laws were once intended to ban only actual discrimination. Modern law, however, attempts to ensure that no member of a protected group is subjected to a “hostile work environment,” a “hostile educational environment” or even a “hostile public environment.” The result has been a wild proliferation of speech and behavior codes throughout the nation’s workplaces, universities and other public spaces.

Forty years ago, Congress responded to the moral urgency of ending Jim Crow and bringing blacks and other minorities into the American mainstream by enacting the Civil Rights Act of 1964. Since then, the primary justification for anti-discrimination laws has shifted from this relatively limited goal to an authoritarian agenda aimed at eliminating all forms of supposedly invidious discrimination. Such a goal cannot possibly be achieved — or even pursued — without grave consequences for civil liberties.

Today, we need to accept that attempting to totally eradicate discriminatory attitudes and actions is not feasible if we want to preserve civil liberties. Preserving the liberalism that defines the United States, and the civil liberties that go with it, requires Americans to show a certain level of virtue, including a phlegmatic tolerance of those who intentionally or unintentionally offend and sometimes — when civil liberties are implicated — even of those who blatantly discriminate.

Admittedly, asking Americans to display a measure of fortitude in the face of offense and discrimination is asking for a lot. But in the end, it is a small price to pay for preserving the pluralism, autonomy and check on government power provided by civil liberties.