WASHINGTON — At the direction of the young dictator Kim Jong-un, officers in the North Korean military have carried out the executions of more than 340 of the country’s own citizens, including other military officials, using methods that are often as morbidly theatrical as they are inhumane and barbaric.

President Trump saluted one of those officers this week.

Mr. Trump’s salute — captured in a lengthy documentary on the Singapore summit meeting produced by North Korean state media — put the White House on the defensive Thursday and drew questions about whether a high-ranking officer of a militaristic dictatorship deserved to be on the receiving end of a gesture meant to symbolize respect, camaraderie and reverence.

“It’s a common courtesy when a military official from another government salutes that you return that,” Sarah Huckabee Sanders, the White House press secretary, said during a briefing with reporters.

In the documentary, the president was shown saluting the officer — Gen. No Kwang-chol, the North Korean defense chief — after first trying to shake the general’s hand. Mr. Kim is shown standing nearby.