BEIJING — Just a few months ago, President Xi Jinping was welcoming leaders from around the world to discuss China’s multibillion-dollar plan to build a new Silk Road trade route.

Presidents and prime ministers came from Russia, Turkey and nearly all of China’s Asian neighbors.

But not Singapore. Singaporean Prime Minister Lee Hsien Loong’s nation-state is a major trader with China, home to Southeast Asia’s largest port and a vocal supporter of China’s “Belt and Road” project.

Amid festering disagreements between Singapore and Beijing — especially over Singapore’s strategic relationship with Washington and its stance on China’s territorial disputes with its neighbors over the South China Sea — Lee was nowhere to be seen at the summit. Eventually, one of his Cabinet ministers revealed Lee hadn’t been invited.

But times have changed. On Wednesday, Xi welcomed Lee at Beijing’s Great Hall of the People, calling his three-day visit “a reflection of the closeness of the two countries’ relations.”

Some relationships, it turns out, are just too important to let politics get in the way. At least not for long.

“Their differences are manageable,” said Li Mingjiang, a scholar at Singapore’s S. Rajaratnam School of International Studies, who called the two nations’ disagreements “hiccups.”

“Singapore and China have no territorial dispute, no maritime dispute. Singapore doesn’t pose any threat to China’s core national interest,” he said.

Singapore and China have long had a complicated relationship. Singapore, with its majority Chinese population, is culturally linked to China, but has long been strategically allied with the United States and has good relations with Taiwan, which Beijing claims as Chinese territory. It has also been one of the most prominent countries in Southeast Asia to push back as Beijing asserted its power in the South China Sea, where China is pitted against many of its smaller neighbors in a string of disputes.

While Singapore does not claim territory in the South China Sea, it has said that countries must abide by international rules. China claims most of the strategic waterway despite a landmark ruling by an international tribunal last year that invalidated its claims.

What China and Singapore do have are immense economic ties, with China reporting $44 billion in exports to the nation-state in 2016 and $26 billion in imports. The two also have large-scale shared projects, from a joint industrial park to a regional trade corridor.

“China-Singapore relations are always complex, because Singapore pursues a balanced foreign policy,” carefully maneuvering diplomatically between Beijing and Washington, said Wang Shaopu, director of the Center for Pan-Pacific Studies at Jiaotong University in Shanghai. Lee’s visit to Beijing, which comes at a symbolically important time as China prepares for October’s important ruling party congress, “marks that relations are moving into a state of stability,” he said.

China’s Communist Party-owned Global Times newspaper called the visit Singapore’s “attempt to adjust its Beijing policy.”

“Although Singapore is more reliant on Washington in politics and security, it is growing closer to Beijing in economics and is trying to play down its identity as a U.S. ally in dealing with Beijing,” the newspaper said Tuesday. “Such strategic positioning has been at risk in recent years.”