The State Department condemned the attack and said the embassy in Seoul was working with local law enforcement. Secretary of State John Kerry, who was in Riyadh, Saudi Arabia, said that he had spoken to Mr. Lippert. “He’s good as can be expected, his spirit is strong,” Mr. Kerry said. “He tends to soldier on, or as he said to me, sailor on.”

Image Security personnel detained the assailant, who identified himself as Kim Ki-jong and said he was protesting joint American-South Korean military exercises. Credit... Yonhap, via Reuters

President Park Geun-hye of South Korea, who was visiting the United Arab Emirates, called the incident an “intolerable attack on the South Korean-United States alliance,” and she ordered a thorough investigation and beefed-up security for foreign envoys in Seoul.

The South Korean police said the attack occurred about 7:40 a.m. on Thursday, shortly after Mr. Lippert arrived at a restaurant attached to Sejong Center, a performance hall across from the American Embassy in the center of Seoul. He was scheduled to deliver a speech at a breakfast meeting hosted by the Korean Council for Reconciliation and Cooperation, a local group.

“He sat at the head table and was exchanging name cards when a man approached the ambassador and toppled him and attacked him in the face with a knife,” said one of the South Korean reporters at the scene, who spoke on the condition of anonymity because of his paper’s regulations on giving information to other news organizations.

Yoon Myeong-song, head of the Jongno Police Station in central Seoul, said Mr. Kim used a knife 25 centimeters long, or about 10 inches, in the attack on Mr. Lippert.

After an urgent meeting of vice ministers, the South Korean government on Thursday vowed a “stern punishment” for officials who failed to protect Mr. Lippert. But Mr. Yoon said the police did not check the people entering the breakfast meeting because the embassy did not request it. “We had received no request from the embassy for bodyguard service,” he told reporters.

He added that the police had taken their own security measure in deploying 28 officers around the restaurant. Some of those officers joined participants of the breakfast meeting in subduing the attacker, Mr. Yoon said.