The last time South Korea was under martial law, Chung Chin-ook was in his first year of high school, more than 40 years ago. His home city of Gwangju rose up to protest oppressive measures by the military junta, only to face a brutal, bloody crackdown.

Late Tuesday night, those memories raced through the now 60-year-old lawmaker’s head as he scaled the fence surrounding the National Assembly. He and other members rushed to the chamber to nullify President Yoon Suk Yeol’s imposition of martial law, evading the police officials who stood guard at the gates.

“I immediately thought of 1980, and the fear and desperation we felt,” said Mr. Chung, one of the 190 members of the assembly who voted unanimously against martial law early Wednesday. “It didn’t seem real that we were undergoing this again after 40 years.”

From inside the chamber, lawmakers nervously watched live footage as special forces troops landed in helicopters on the lawn and broke windows to enter the building, Mr. Chung said by telephone. Aides blockaded the entrance to buy time as Mr. Chung and his colleagues went through the procedures for the vote.

He said the color of the troops’ fatigues brought back memories of the soldiers who kicked and slapped him and his brothers at the start of the Gwangju crackdown, telling them to go home. Even though it seemed possible that this new standoff, like the one in 1980, could lead to bloodshed, he said it felt important to take a stand.

“There was an indescribable fear and rage, and the feeling that we cannot lose this time,” he said. “Back then, I was too young to fight.”

Lee Jae-eui was a 24-year-old college student when the Gwangju killings occurred. He served 10 months in prison after being arrested for illegal assembly and distributing information in violation of the martial law that was then in effect.

At his home in Gwangju, Mr. Lee was awakened late Tuesday night by repeated messages on his phone. He rose in time to watch a live broadcast of the military entering the National Assembly. He said he watched with a mix of disbelief and dismay.

“It was total déjà-vu,” said Mr. Lee, now 68. “After democratization, I didn’t think this would happen again in our lifetime.”

He said the people who lived through democratization were intimately familiar with the terror that martial law and military rule can bring. South Korea has gone through too much to allow that history to repeat itself, he said.

“The people know this is not lawful,” he said.