Nearly 160 parliament members voted for the bill, with one voting against it. Opposition lawmakers apparently boycotted.
The 38 liberal lawmakers who filibustered said the bill threatens personal freedoms and privacy. They took turns speaking for more than 193 hours in the filibuster beginning February 23, reportedly making it one of the longest of its kind in world politics.
They stopped their marathon speeches out of concern that a continuation might cause a public backlash ahead of April parliamentary elections.
President Park Geun-hye's conservative government had called for the bill's quick passage, citing threats from North Korea following its recent nuclear test and rocket launch.
More From This Section
Filibusters to block legislative action made a comeback in South Korean politics in 2012 under a law designed to improve parliamentary politics. Before that, partisan strife was so acute that rival lawmakers sometimes engaged in violent shoving matches.
Critics worry the National Intelligence Service might misuse the law to monitor opponents and other civilians. Previously, the agency could only wiretap those suspected of engaging in pro-North Korean activities.
The law also calls for establishment of an anti-terror center tasked with formulating security measures for major state events and issuing terror advisories.
Several similar anti-terror bills have been introduced in the assembly in recent years but none became law, due in large part to wrangling over what investigative rights the NIS should be given. November's Paris attacks that killed 130 people and North Korea's recent nuclear test and rocket launch are believed to have helped the bill's approval.