A former doctor with a humble background, Mr. Lai is seen as more attuned to the mood of Taiwan’s people than to the perilous nuances of dealing with Beijing.In 2014, when Lai Ching-te was a rising political star in Taiwan, he visited China and was quizzed in public about the most incendiary issue for leaders in Beijing: his party’s stance on the island’s independence.His polite but firm response, people who know him say, was characteristic of the man who was on Saturday elected president and is now set to lead Taiwan for the next four years.Mr. Lai was addressing professors at the prestigious Fudan University in Shanghai, an audience whose members, like many mainland Chinese, almost certainly believed that the island of Taiwan belongs to China.Mr. Lai said that while his Democratic Progressive Party had historically argued for Taiwan’s independence — a position that China opposes — the party also believed that any change in the island’s status had to be decided by all its people. His party was merely reflecting, not dictating, opinion, he said. The party’s position “had been arrived at through a consensus in Taiwanese society,” Mr. Lai said.To both his supporters and his opponents, the episode revealed Mr. Lai’s blunt, sometimes indignant sense of conviction, a key quality of this doctor-turned-politician who will take office in May, succeeding President Tsai Ing-wen.“He makes clear-cut distinctions between good and evil,” said Pan Hsin-chuan, a Democratic Progressive Party official in Tainan, the southern city where Mr. Lai was mayor at the time of his 2014 visit to Fudan University. “He insists that right is right, and wrong is wrong.”The son of a coal miner, Mr. Lai, 64, has a reputation for being a skilled, hard-working politician who sees his humble background as attuning him to the needs of ordinary people in Taiwan. When it comes to navigating the hazardous nuances of dealing with Beijing, however, he may be less adept.Supporters of Mr. Lai at a campaign event in Taipei on Saturday.Lam Yik Fei for The New York TimesMr. Lai may have to watch his tendency for occasional off-the-cuff remarks, which Beijing could exploit and turn into crises.“I don’t think that Lai is actually going to pursue de jure independence,” said David Sacks, a fellow at the Council on Foreign Relations who studies Taiwan. “But what I do worry about is that Lai doesn’t have that much experience in foreign policy and cross-strait relations — which is incredibly complex — and he is prone to a slip of the tongue, that Beijing pounces on.”In interviews with those who know Mr. Lai, “stubborn” or “firm” are words often used to describe him. But as Taiwan’s president, Mr. Lai may have to show some flexibility as he deals with a legislature that is dominated by opposition parties that have vowed to scrutinize his policies.As the leader taking the Democratic Progressive Party into power for a third term, Mr. Lai would have to be very attentive to the public mood in Taiwan, Wang Ting-yu, an influential lawmaker from the Democratic Progressive Party, said an interview before the election.“How to keep the trust of the people, how to keep politics clean and above board: that’s what a mature political party has to face up to,” Mr. Wang said. “You must always keep in mind that the public won’t allow much room for mistakes.”During the election campaign, one of Mr. Lai’s most successful ads showed him and President Tsai on a country drive together, chatting amicably about their time working together. The message made clear when Ms. Tsai handed over the car keys to Mr. Lai, who has been her vice president since 2020, was that there would be reassuring continuity if he won.Whatever continuity may unite the two in policy, Ms. Tsai and Mr. Lai are quite different leaders with very different backgrounds. President Tsai, who has led Taiwan for eight years, remains liked and respected by many. But she also governed with a kind of technocratic reserve, rarely giving news conferences.Ms. Tsai rose as an official negotiating trade deals and crafting policy toward China. Mr. Lai’s background as a city mayor, by contrast, has made him more sensitive to problems like rising housing costs and a shortage of job opportunities, his supporters say.“Lai Ching-te has come all the way from the grass roots — as a congress delegate, legislator, mayor, premier — climbing up step by step,” said Tseng Chun-jen, a longtime activist for the D.P.P. in Tainan. “He’s suffered through cold and poverty, so he understands very well the hardships that we people went through at the grass roots in those times.”Ms. Tsai and Mr. Lai have not always been allies. Ms. Tsai brought the D.P.P. back to power in 2016 after it had earlier suffered a devastating loss at the polls. Mr. Lai was her premier — until he quit after poor election results and boldly challenged her in a primary before the 2020 election.Mr. Lai, left, with President Tsai Ing-wen, center, at a rally in Taipei this month.Mike Kai Chen for The New York Times“Tsai Ing-wen joined the D.P.P. as an outsider, when the D.P.P. needed an outsider,” said Jou Yi-cheng, a former senior official with the party who got to know Mr. Lai when he was starting out in politics. “But Lai Ching-te is different. He’s grown up within the D.P.P.”Mr. Lai spent his early years in Wanli, a northern Taiwanese township. His father died from carbon monoxide poisoning while down a mine when Mr. Lai was a baby, leaving Mr. Lai’s mother to raise six children herself.In his campaigning, Mr. Lai has cited the hardships of his past as part of his political makeup.He said in a video that his family used to live at a miner’s lodge in the township, which would leak when it rained, prompting them to cover the roof with lead sheets — which were not always reliable. “When a typhoon came, the things covering the roof would be blown away,” he said. Mr. Lai kept at his studies and went to medical school. After doing military service, he worked as a doctor in Tainan. It was a time when Taiwan was throwing off decades of authoritarian rule under the Nationalist Party, whose leaders had fled to the island from China after defeat by Mao Zedong and his Communist forces.Mr. Lai joined what was at the time a scrappy new opposition party, the Democratic Progressive Party, and he later recalled that his mother was disappointed when he decided to set aside medicine to go into politics full time.“He got his mother’s reluctant support,” wrote Yuhkow Chou, a Taiwanese journalist, in her recent biography of Mr. Lai. When he first decided to run for a seat in the National Assembly in 1996, Ms. Chou wrote, Mr. Lai’s mother told her son, “If you fail to get elected, go back to being a doctor.”However, Mr. Lai turned out to be a gifted politician. He rose quickly, helped by his appetite for hard work as well as his youthful good looks and eloquence as a speaker, especially in Taiwanese, the first language of many of the island’s people, especially in southern areas like Tainan, said Mr. Jou, the former party official.Voters lining up in Taipei on Saturday.Lam Yik Fei for The New York TimesMr. Lai became a member of Taiwan’s legislature and then, in 2010, the mayor of Tainan. Later he served as premier and vice president to Ms. Tsai. Along the way, he revealed a combative streak that gave his critics ammunition, but also won him fans in his party.D.P.P. supporters cite a clip of him in 2005, lashing out at opposing Nationalist Party members in the legislature for blocking a budget proposal to buy U.S. submarines, jets and missiles. “The country has been destroyed by you!” he said, cursing at one point. “You guys have blocked everything.”As premier in 2017, Mr. Lai made the comment most often cited by his critics. Facing questions from Taiwanese lawmakers, Mr. Lai described himself as a “pragmatic worker for Taiwanese independence.”At the time, China’s government office for Taiwan affairs condemned the comment; ever since, Beijing and Mr. Lai’s Taiwanese critics have held it up as proof of his reckless pursuit of independence. But Mr. Lai’s words were in line with his party’s broader effort to rein in tensions over the issue of Taiwan’s status by arguing that the island had already achieved practical independence, because it was a self-ruled democracy.Still, Mr. Lai will be under great pressure to avoid such remarks as president. China has grown stronger militarily and, under Xi Jinping, increasingly willing to use that force to pressure Taiwan. In his election night victory speech, Mr. Lai emphasized his hope of opening dialogue with Beijing.“He kept it vague and, to my ear, he didn’t say any of the phrases that Beijing finds intolerable,” said Kharis Templeman, a research fellow at the Hoover Institution who studies Taiwan and monitored the election. “He gave himself a fighting chance to avoid, or at least delay, the harshest reaction from Beijing.” More