The presiding judge, Shin Jin-woo, acknowledged that some of Mr. Park’s posts were parody. But he said Mr. Park’s overall acts were tantamount to “supporting and joining forces with an antistate entity.” The justice said his court suspended the prison term, however, because Mr. Park promised not to repeat his act. Prosecutors argued that Mr. Park’s Twitter posts served as a dangerous tool for spreading North Korean propaganda.

“The National Security Law is interpreted too broadly, so it is abused to suppress the freedom of expression in the name of national security,” Mr. Park said by phone after the ruling. He said he planned to appeal the verdict. Many Twitter users criticized the ruling. One said, “The message is that if you babble on Twitter carelessly, you can end up in prison.”

The United Nations and human rights groups have called on South Korea for years to repeal or revise the law, which the country’s past military dictators had used not only against people suspected of being spies but also against political dissidents. The law has proved resilient in a society where many fear North Korea, which has launched military provocations against the South.

The South Korean government under the conservative president Lee Myung-bak “increasingly invoked the National Security Law to restrict freedom of expression, particularly in the context of discussions pertaining to North Korea,” Amnesty International said in its 2012 annual report, citing Mr. Park’s case and a sharp rise in the number of Web sites censored by the government for fear of threatening national security. “The authorities closely monitored the Internet and social networking sites such as Twitter and Facebook.”

South Korea blocks its citizens’ access to North Korean Web sites, though North Korea has found a way to penetrate the firewalls by using Twitter accounts. The Twitter account whose posts Mr. Park forwarded is run by the North Korean government Web site Uriminzokkiri, which the South Korean news media regularly cite in their reports.