BEIJING — During a two-hour television broadcast that was part morality play, part propaganda tour de force, the Chinese government on Friday sent four foreign drug traffickers to their deaths after convicting them of killing 13 Chinese sailors two years ago as they sailed down the Mekong River through Myanmar.

Although the live program ended shortly before the men were executed by lethal injection, it became an instantly polarizing sensation, with viewers divided on whether the broadcast was a crass exercise in blood lust or a long-awaited catharsis for a nation outraged by the killings in October 2011. Some critics said the program recalled an era not long ago when condemned prisoners were paraded through the streets before being shot in the head.

“Rather than showcasing rule of law, the program displayed state control over human life in a manner designed to attract gawkers,” Han Youyi, a criminal law professor, wrote via microblog. “State-administered violence is no loftier than criminal violence.”

One prominent rights lawyer, Liu Xiaoyuan, insisted that the show, by the national broadcaster CCTV, violated Chinese criminal code by making a spectacle of the condemned. “I found it shocking,” he said in an interview.