The lowly soybean became the unlikely star of U.S.-China diplomacy Thursday during a visit here by Chinese Vice President Xi Jinping.

Xi, who is expected to take over as China’s president next year, talked at length of China’s need for the beans, visited a soybean farm and had officials accompanying him sign agreements for massive shipments this year. He even took a seat on a John Deere tractor.

The visit, part of a highly scripted weeklong U.S. tour, was meant to highlight how U.S. food exports such as soybeans represent a bright spot in a relationship that is otherwise mired in turmoil.

By spending two days in Iowa — during which he also reminisced with old acquaintances and shared toasts with various farming officials — Xi’s message was clear: Despite disagreements between the United States and China over human rights, the appropriate response to bloodshed in Syria, territorial disputes in the South China Sea, and the status of Taiwan, at least the two countries can agree on soybeans.

China is believed to be the ancestral home of the soybean — which is used there in a variety of ways, including in the production of tofu, a major part of the Chinese diet.

Officials traveling with Xi signed agreements to buy more than 8 million tons of soybeans valued at $4.3 billion from the United States; they were working on additional deals Thursday that could result in the purchase of an additional 12 million tons.

U.S. food exports to China have been booming of late, and Iowa was in many ways the perfect venue to highlight the growth. It is the largest U.S. producer not only of soybeans, but also corn and pork.

Last year, China became the biggest customer for U.S. agricultural exports as a whole, with purchases totaling roughly $20 billion.

U.S.-Chinese trade relations outside agriculture have been more contentious. American officials and business leaders have assailed China over intellectual property theft and have been highly critical of its currency valuation and fair-trade practices. Meanwhile, the U.S. trade deficit with China reached $295 billion last year.

On Thursday, Republican presidential candidate Mitt Romney assailed the Obama administration for its China policy, saying in a Wall Street Journal op-ed that the policy is headed in “precisely the wrong direction” and calling this week’s meetings with Xi “empty pomp and ceremony.”

The Obama campaign responded, pointing out that Romney had invested in China in the past and implying that his sale of those investments had been driven by political motivations. Romney is trying to “have it both ways,” the campaign said.

For Xi, the trip to Iowa — which he visited 27 years ago as a provincial official — was less about politics and more about burnishing his image.

At a symposium Thursday in Des Moines, he recalled his own days toiling in fields during the tumultuous years of China’s Cultural Revolution.

“I was a farmer in China and even worked as a village head,” he said. “Agriculture, rural areas and farmers have a special place in my heart.”

Later, while visiting soybean fields, Xi quizzed a farmer with rapid-fire questions about grain bin capacity, crop financing and the intricacies of crop pricing.

As he and the farmer walked around hulking pieces of farming machinery, Xi glanced at the scrum of cameras and reporters surrounding them and quietly discussed with his host the possibility of climbing into the green tractor before them.

He did, sending photographers and camera crews into a frenzy, with some even clambering onto the tractor itself for a clean shot.

“Xi represents a new generation very savvy of world opinion,” said Robert Kuhn, an author and confidante of senior Chinese leaders. “Even though he’s not picked in elections, he knows people are looking for reasons to trust and like him.”

Xi departed Iowa on Thursday afternoon and spent the rest of the day touring the Port of Los Angeles, where he continued highlighting U.S.-Chinese trade relations.

On Friday, while still in L.A., he is expected to announce a major entertainment deal, which the Financial Times reported would team up DreamWorks Animation with two state-owned Chinese companies to build a new studio in Shanghai.

Xi also might attend a Lakers basketball game.