Vice President Biden speaks to students as his Chinese counterpart Xi Jingping listens during a visit to the International Studies Learning School in Southgate outside of Los Angeles in February 2012. (FREDERIC J. BROWN/AFP/Getty Images)

Long before Xi Jinping became China’s president this year, Vice President Biden was put in charge of the White House’s effort to court him — spending about 20 hours in frank and often unscripted talks to try to build trust between the two superpowers.

That relationship will be tested this week as Biden embarks on a week-long trip to China, Japan and South Korea in the wake of a string of diplomatic eruptions over the past two months.

In October, President Obama canceled a visit to southeast Asia aimed in part at checking China’s growing influence in the region. Then China angered U.S. allies by aggressively claiming rights to airspace currently controlled by Japan and South Korea, prompting the United States to fly two B-52 bombers into the disputed area last Monday.

Although his itinerary was planned ahead of these events, Biden is in many ways the obvious choice to do damage control for an administration eager to rebalance its foreign policy toward Asia and improve relations with one of its key rivals.

Administration officials said the strategy of getting to know Xi succeeded in breaking the ice, allowing Biden, more than any other U.S. official, to develop a personal connection with the Chinese leader. During the visits, they spent hours talking at the Naval Observatory library and traveled together to Los Angeles and Chengdu province. Xi marveled at Biden’s ease in mingling with ordinary people; Biden was impressed by Xi’s grasp of local governance issues.

“You don’t know what the impact is. It may be minimal because in the final analysis there are national interests and long-term policies,” said Robert Wang, a State Department official who served as deputy chief of mission at the U.S. Embassy in Beijing and attended some of Biden’s meetings with Xi. “But to the extent that there is a marginal impact, that is where it could be important. Whether you make a decision one way or another, if there’s a personal connection, it might make you hesitate a little bit.”

Biden aides said the vice president will raise U.S. concerns about China’s move last weekend to declare control of an “air defense identification zone” over disputed waters and islands, which has increased military tensions with Japan.

Even as he does so, however, Biden also intends to touch on other administration priorities, including Iran, North Korea, cybersecurity and intellectual property rights, aides said. He will sound notes of encouragement about China’s recent manifesto to pursue ambitious economic reforms, aimed at establishing international market-based competition among Chinese businesses and jolting that nation’s slowing economy.

Biden’s visit is intended in part to build on a California summit last spring, when Obama and Xi agreed to seek a “new model of major power relations.” But the trip also will continue the relationship begun during Biden’s earlier visits with Xi, who was then China’s vice president.

The first meeting came in August 2011, when Biden joined Xi in Beijing and traveled with him to Chengdu, away from the formalities of the capital city.

“Some Americans make the mistake of throwing down draft agreements in their first meeting, and the typical Chinese response is, ‘Who are you?’ ” said TCW Managing Director David Loevinger, a former Treasury official for China affairs who attended some of the meetings with Biden and Xi. “Sometimes an agreement is worth little more than the paper it’s printed on. There’s really no substitute for developing personal relationships of trust at the highest levels.”

Biden’s trip that year had been delayed for several days, as Obama and Congress barely staved off a potentially disastrous default on the U.S. debt. Xi, worried about continued slow growth in Europe and the United States, pressed Biden on U.S. Treasury bonds, of which the Chinese are the largest foreign shareholders.

Biden responded by explaining that the United States has a system of dissenting political parties, resulting in sometimes messy negotiations with Congress, according to people with knowledge of the meeting.

As is his wont, Biden strayed from the script at times in a bid to charm his hosts, such as when he recalled his stuttering problem as a child during a speech at a Sichuan University, surprising his aides but drawing a warm reaction from the English-speaking Chinese students. (He also got into political trouble with conservatives back home when he made an offhand remark that he would not second-guess China’s one-child policy.)

The vice president “ad-libbed and improvised extensively,” recalled Kurt Campbell, a former U.S. assistant secretary of state for East Asia who accompanied Biden on the trip. “This turned out to be highly effective, and the Chinese were often enthralled by the elaborate discourse.”

At times, the strategy seemed risky. Biden visited an inexpensive Beijing noodle shop, sampling the pork buns and cracking jokes with customers. The move delighted local reporters and received extensive news coverage. But Campbell said the U.S. delegation later learned that their Chinese hosts were concerned that “the contrast between the extravagant trappings of Chinese leadership style and Biden’s man-of-the-people approach was unfavorable.”

Since taking over as president, Xi has earned a reputation as a retail politician with a more common touch than his predecessor, the remote Hu Jintao. When Biden later saw news coverage of Xi interacting with ordinary Chinese, he would joke with aides, “I started that,” said Julie Smith, Biden’s former deputy national security adviser.

“The thing about the vice president is that, despite the fact that folks think he is prone to gaffes, he’s like a savant dealing with foreign leaders,” Smith said.

Xi’s turn to visit Biden came in February 2012, when he traveled to Washington to meet with Obama and Biden and tour the Pentagon. Advisers also arranged for Xi to visit Iowa, where he had studied pig farming as a young rural Communist Party official, and Los Angeles, which has a large Chinese American population.

Biden joined him in Los Angeles, where they toured a school that taught Mandarin. Xi also attended a Los Angeles Lakers basketball game with then-Mayor Antonio Villaraigosa (D), who persuaded the normally staid Chinese delegation to ditch their neckties. They posed for pictures with Magic Johnson and David Beckham.

Xi mostly stuck to familiar Communist Party talking points during the formal meetings. But in their informal discussions, aides said, he peppered Biden with questions about U.S. politics, the civilian-controlled military and state-vs.-federal governance. Biden was impressed by the Chinese leader’s knowledge of municipal problem-solving, honed through years of rising through the ranks of China’s provincial political apparatus, they said.

One person familiar with the meetings cautioned that Biden did not come away viewing Xi as a transformational figure in the vein of the Soviet Union’s Mikhail Gorbachev, preparing to undo China’s Communist Party system.

“The read from people in the room was that Xi was using this in part to ask questions about problems of governance that he confronts in China and to further his thinking,” said Kenneth Lieberthal, a senior fellow at the Brookings Institution who worked as an Asian affairs director in the Clinton administration.

“One of the things that impressed Biden is that Xi came across to him, in the best sense, as a politician,” Lieberthal added. “Xi could talk about problems with the fire department, stuff local officials deal with. Clearly he relished this stuff and was very hands-on. I’ve heard others say that Biden’s conclusion was Xi is the real article.”