Terrorism doesn’t just traumatize, maim and murder. It forces a defining debate on how to balance government’s duty to protect not just life but liberty.

And legislation passed by the lower house of France’s Parliament last week re-confirms how the fear of terror can erode freedom. The legislation, approved by an overwhelming 438-86 margin, is also expected to pass in the upper house next month.

According to The New York Times, the new regulations “could give authorities their most intrusive domestic spying abilities ever, with almost no judicial oversight.”

The French public understandably is demanding more stringent security measures in the wake of bloody attacks in Paris early this year by Islamic zealots.

On Jan. 7, Said and Cherif Kouachi, who identified themselves as affiliated with al-Qaida in Yemen, shot 11 people to death and wounded 11 more at the offices of Charlie Hebdo, a satirical newspaper that published cartoons poking fun at the prophet Muhammad. They then murdered a police officer after leaving the scene. The Kouachis were killed in a shootout with the authorities on Jan. 8.

Meanwhile, Amedy Coulibaly, a terrorist who claimed allegiance to ISIS, took hostages at a kosher deli. He murdered four people, all of them Jewish, before being killed by the police.

And those are far from the only incidents of violence committed in recent years by the expanded ranks of terrorists in France, where many Muslims have not assimilated into the national culture.

Among the provisions that the French legislation has aimed at countering that rising threat:

The authorities could, according to the Times, “tap cellphones, read emails and force Internet providers to comply with government requests to sift through virtually all of their subscribers’ communications.”

They also could install recording equipment in homes and cars.

That sounds ominously familiar. The U.S. National Security Agency has gone to similar extremes in the name of reducing the terror peril here in our country.

And the New York-based 2nd Circuit U.S. Court of Appeals ruled last Thursday that the NSA’s “bulk collection” of phone records goes beyond what Congress authorized.

The 2001 attack on the U.S. homeland brutally demonstrated the need for stronger security measures in our nation — and beyond — against the forces of Islamic terror.

Yet that continuing menace doesn’t justify voiding the Bill of Rights. And a wide range of groups, including the American Civil Liberties Union on the left and FreedomWorks on the right, are now correctly urging federal lawmakers to reform the surveillance program the NSA has carried out under the 2002 Patriot Act, which President George W. Bush signed into law less than six weeks after 9/11.

As Founding Father Benjamin Franklin, America’s first ambassador to France, wrote so well so long ago:

“Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety.”

And when freedom loses, terrorism wins.