Lee Jae-myung, the leader of South Korea’s main opposition party, was stabbed in the neck on Tuesday morning by a man who approached him asking for his autograph, the police said.

Mr. Lee, 59, the leader of the liberal Democratic Party, was making his way through a crowd in the port city of Busan when he was attacked, according to the police and live-streamed TV footage of the incident. He had just finished taking questions from journalists after touring the site of a planned airport.

The police in Busan said the assailant, a 66-year-old man, had been detained and was under investigation for a possible charge of attempted murder. But they did not provide details about Mr. Lee’s condition or the motives of the attacker, who they said had used a knife with a five-inch blade.

Mr. Lee was bleeding from the neck before being taken away in an ambulance, according to news reports and photos from the scene. He was taken to a hospital in Busan, then flown to Seoul by helicopter for treatment at Seoul National University Hospital.

Mr. Lee was conscious and recovering from a two-hour-long surgery to remove blood clots and patch up a damaged jugular vein in his neck, Kwon Chilseung, a spokesman for his party, said during a news briefing at the hospital on Tuesday evening.

“It was a close call because it was not an artery, but a vein” that was stabbed, said Jung Chungrae, a senior member of the Democratic Party, citing doctors.

​Footage from the attack showed the assailant approaching Mr. Lee through a group of TV camera operators, apparently posing as one of his supporters; he was wearing what appeared to be a paper or plastic crown, bearing the words “I am Lee Jae-myung.” Supporters and police officers overpowered the man after the stabbing and took him to a police car.

“The man approached Mr. Lee, asking for his autograph in a loud voice,” Son Je-han, a senior investigator with the Busan police, told reporters at a news briefing.

Mr. Lee was narrowly defeated by Yoon Suk Yeol, a conservative, in South Korea’s last presidential election, in 2022. He has since been subjected to a series of investigations by state prosecutors on corruption and other criminal charges.

He denied all the charges against him and went on a three-week hunger strike last year in protest, accusing Mr. Yoon of using the criminal justice system to intimidate his political opponents. A court refused to allow prosecutors to arrest Mr. Lee, but he faces the prospect of a series of trials.

Mr. Yoon expressed “deep concern” about Mr. Lee’s safety on Tuesday, ordering his government to carry out a quick investigation of the attack and to provide support for his medical treatment, the president’s office said in a statement.

“The president emphasized that this form of violence should not be tolerated under any circumstances in our society,” the statement said.

South Koreans are sharply divided over Mr. Lee, who is widely expected to run for president again, in 2027. His progressive supporters consider him a plain-talking champion for the poor and for social minorities, while his conservative detractors call him a corrupt populist.

The country’s politics have become increasingly polarized in recent years, and rancor between Mr. Yoon’s supporters and Mr. Lee’s has been rising with the approach of parliamentary elections in April.

But physical attacks on politicians have been uncommon. In 2006, the conservative politician Park Geun-hye, then an opposition leader, was slashed in the face with a box cutter by a man who had been a vehement critic of her. Ms. Park went on to win the 2012 presidential election.

In 2015, a self-styled nationalist who had expressed anti-American sentiments cut the face of Mark W. Lippert, then the United States ambassador to South Korea, with a kitchen knife.

The Democratic Party considers the stabbing of Mr. Lee an “act of terror” and an “attack against democracy,” said Mr. Kwon, the party spokesman.

Y​oon Hee-keun, the chief of South Korea’s national police agency, ordered beefed-up security for politicians and other prominent officials.