It doesn’t rival Islamic State or abortion as an issue in the presidential race, but China might be the most complex challenge the winner will have to deal with. The country, which has the world’s second-biggest economy and second-highest military spending, is a frenemy of the first order. It finances America’s federal budget deficit by buying Treasury bonds, and it sends more students to the US than any other nation. It’s a natural ally on some issues (Islamic terrorism) but an implacable foe on others (freedom of navigation in the South China Sea). President Barack Obama will bequeath his successor a string of partial successes. China, the biggest greenhouse gas polluter, agreed with the US to curb emissions, albeit not as fast as the administration would like. It allowed its currency to gain in value, making its exports less competitive — although lately the yuan has fallen again. China didn’t retaliate after the US Navy cruised by contested islands in the South China Sea in October, but the country’s Ministry of National Defence didn’t hesitate to accuse Washington of a “serious military provocation” on December 19, days after a pair of B-52 bombers flew over Chinese-built artificial islands in the same area. READ MORE: How Donald Trump’s vulgar tirade may help Hillary Clinton The share of Americans who regard China unfavourably went down slightly in 2015, after ticking up for several years. But China is determined to assert itself — and challenge U.S. supremacy — on many fronts over the next four years and beyond. “Any candidate has to treat them with nuance, or should,” says Ted Truman, a non-resident senior fellow at the Peterson Institute for International Economics. So far, nuance has been missing from the campaign. Donald Trump, the leading Republican in the polls, speaks of China primarily as a cheater. It’s not a new line of attack — 2012 Republican nominee Mitt Romney, whose Bain Capital backed companies that helped outsource jobs to China — described the Chinese in the same terms. Trump’s dark view of China could have something to do with his personal history. In 2005 the Hong Kong majority partners in a Trump-branded housing development on New York’s Upper West Side sold the project without his approval, for what he regarded as too little money. He sued, and the case was settled out of court. The leading Democrat, Hillary Clinton, sounds nearly as hawkish on the subject of Beijing. As Obama’s secretary of State from 2009 to 2013, she introduced the “pivot to Asia” policy, designed in part to prevent Chinese hegemony in the region. At a New Hampshire event last July, shortly after it was revealed that China was behind a massive electronic intrusion into US Department of State personnel records, she accused the country of “trying to hack into everything that doesn’t move in America.” READ MORE: Hillary Clinton would thump Trump if election were held today, poll finds Clinton has been tough on Chinese trade practices as well, going back to her experience as a US senator from New York. In 2004 the Chinese Ministry of Commerce made a formal complaint to the World Trade Organisation accusing Corning, based in upstate New York, of “dumping” optical fibres on the Chinese market at below cost. Clinton invited Chinese officials to her Senate office to discuss the matter, and personally raised the issue with the White House. China dropped the case the next year, deciding instead to exempt Corning from import duties. “She tends to be harder on China than her husband was,” says Jeffrey Bader, who was chief adviser to the Obama administration on China until 2011 and has remained close to Clinton. China is a litmus test for how the presidential candidates would govern on a broad range of issues. Are they isolationists or interventionists? Do they see foreign policy as a job for the White House or for Congress? How would they strike a balance between concern for human rights and the economy? Which constituency do they most aim to please — business, labour, religious groups, environmentalists, defence hawks? Human rights, interestingly enough, is an issue that cuts across party lines. Clinton has repeatedly raised concerns about China’s record, most vividly in September, when she criticised President Xi Jinping during a visit to the US, which included a White House state dinner in his honour. That enraged the Chinese. Republicans, including Ted Cruz, Marco Rubio, and Carly Fiorina, have been no less harsh. In contrast, Trump and Bernie Sanders, Clinton’s chief Democratic rival, rarely mention Chinese human-rights issues in their speeches — though Sanders has contrasted China favourably with the US on paid maternity leave, a position that drew him a rebuke from the actor James Woods, who called the senator an “utter moron.” The question of how to respond to China’s displays of military strength offers a clearer picture of what the candidates are about than their grandstanding on what to do in the Middle East. Chris Christie, Fiorina, and Rubio have taken a neoconservative tack on foreign policy, indicating they’d be more willing than others to use force to defend American interests and promote Western democratic ideals in Asia as well as in the Middle East. Senator Rand Paul, a libertarian from Kentucky, is leery of foreign entanglements. In Syria he opposes a no-fly zone that could put the US in direct conflict with Russia. On China, he’s adamant that the US should avoid responding to its shows of strength with a big military buildup. That veers fairly close to the policy advocated by Sanders, who focuses on jobs and little else when it comes to China. His spin is that “billionaires” are shipping jobs from the US to China to take advantage of lower wages, at the expense of workers in both countries. If history is a guide, the candidate who wins in November is likely to be more moderate in office than he or she was on the campaign trail. “China-bashing is part of American campaign politics, and we get that,” says Tao Wenzhao, senior researcher at the Institute of American Studies, part of the Beijing-based Chinese Academy of Social Sciences. President Richard Nixon, a fierce anti-communist, broke the ice with Chairman Mao Zedong by travelling to Beijing in 1972. Presidents Ronald Reagan, Bill Clinton, and George W. Bush also talked tougher on China during their campaigns than they acted once in office. Former Florida governor Jeb Bush, the one-time GOP front-runner, is one of the few candidates willing to signal a moderate approach to China. He understands the importance to Chinese leaders of saving face. On a business trip in 2013, he found himself having to explain why they shouldn’t be offended that First Lady Michelle Obama had decided not to join her husband to meet with President Xi and his wife on their visit to California that year. His father, George H.W. Bush, was the US envoy to China from 1974 to 1975. Britton Hill Holdings, the private equity firm Jeb Bush created in 2013, raised millions from investors including China’s HNA Group, based in the island province of Hainan, and Finergy Capital, a Beijing-based private equity fund. The US can’t simply tell China what to do, no matter how much any president may want to. “Be tough,” says Bader, the Clinton adviser. “But China is an increasingly powerful country that has its own interests, and it doesn’t listen to us.” With less than a year to go before the election, China may remain obscured by more visceral issues. But count on this: When the next presidency begins, no puzzle will be more important.