Hong Kong(CNN) Six months after New Zealand Prime Minister John Key took office in 2008, he was dining in Beijing's Great Hall of the People with the Chinese Communist Party leadership.
A free-trade agreement had been signed just months earlier and, in a jubilant mood, then-Chinese Premier Wen Jiabao told Key that Chinese-New Zealand relations were at their "best in history."
A decade later, it has taken New Zealand Prime Minister Jacinda Ardern nearly 18 months in office to visit China.
As she prepares to finally touch down in Beijing on Sunday to meet with Chinese President Xi Jinping, relations between the two nations are looking far more complicated.
"New Zealand is committed to sustaining a constructive and comprehensive relationship with China," Ardern said on Monday when she announced the trip.
But Jason Young, director of the New Zealand Contemporary China Research Center, said over the past few years more and more issues have come between the two countries.
"Some of those issues are due to how China itself has changed," he said.
The China-New Zealand relationship is one that Ardern's predecessors have taken care to foster.
Key visited the country six times during his eight years as leader. Under Prime Minister Helen Clark, New Zealand in 2008 became the first developed country to sign a free-trade agreement with China.
Today, China is New Zealand's largest trading partner. Two-way trade between the countries was valued at more than $19 billion (28 billion New Zealand dollars) in 2018, according to New Zealand Foreign Affairs and Trade. China is also New Zealand's second-largest tourism market and largest source of international students.
However Wellington's ties to Beijing have raised alarm bells with the United States, New Zealand's longtime ally.
Along with Washington, New Zealand is a member of the exclusive intelligence sharing community known as "Five Eyes," which also consists of the United Kingdom, Canada and Australia.
In an extraordinary statement to the US-China Economic and Security Review Commission in April 2018, former US government analyst Peter Mattis said New Zealand's membership should be reviewed given its relationship with Beijing.
"Australia and New Zealand both face substantial problems with interference by the Chinese Communist Party. In both cases, the CCP has gotten very close to or inside the political core, if you will, of both countries," Mattis told the commission.
Juggling the relationship with the US and China has become increasingly difficult for New Zealand, with relations between the two giants souring amid US President Donald Trump's escalating trade war.
Tensions with Beijing reached a new level in 2018 when New Zealand's Government Communications Security Bureau blocked Chinese technology company Huawei from providing 5G technology to one of the country's major telecommunication companies, Spark.
The US has been putting pressure on its allies and diplomatic partners to ditch Huawei over security concerns, a move which has been regularly condemned by Beijing.
Speaking to CNN in February, Andrew Campbell, a spokesman for Ardern, said the relationship had suffered some "irritation ... because of the GCSB's decision regarding Huawei."
When asked whether Huawei would be on the agenda this weekend, Chinese Foreign Ministry spokesman Geng Shuang evaded the question.
In recent months, Ardern has found herself under greater pressure from opposition politicians and critics to defend the strength of New Zealand's relationship with China.
In February, Ardern was forced to deny that China was deliberately dragging out the visa process for New Zealander diplomats and postponing trips by officials to Beijing.
The same month, local media reported an Air New Zealand flight to Shanghai was mysteriously forced to turn back to Auckland on discovering that its paperwork referred to the disputed island of Taiwan.
At the time, Ardern denied it was a "relationship" issue with China, saying instead it was an administrative error.
But the postponement of a major Chinese-New Zealand tourism event that same month -- which Ardern put down to a scheduling issue -- also added to speculation of a rift.
Ardern's trip also comes at a sensitive time for New Zealand, just two weeks after the terrorist attack against two mosques in Christchurch in which 50 people died. She even said she would be cutting her trip to China short, as it didn't seem "appropriate" to be overseas at such a time.
Following global praise for her handling of the tragedy, the New Zealand leader has come under pressure from human rights group to raise the issue of China's crackdown on Uyghur Muslims with Xi. Up to two million Uyghurs have reportedly been detained in detention centers in the western region of Xinjiang, according to US government reports.
"Given I've raised it before, that should give you an indication," she said when asked by reporters this week.
Prior to her trip, a spokesman for the Prime Minister denied again that she was concerned about the relationship with China worsening under her leadership. "China is one of our most important and far-reaching relationships. Our relationship is mature and resilient," the spokesman said.
China researcher Young agreed with the official line.
"I think if the relationship really was deteriorating in that way, then it would be far clearer. I think China would be a lot more blunt in the message if it was wanting to send a message," he said.
Increasingly, the Pacific -- a region where New Zealand has long been a significant player -- is shaping up to be a new battleground for influence.
China has promised billions of dollars of aid and support in the region and, if it follows through, could overtake Australia as the biggest donor to the Pacific nations.
New Zealand has also been ramping up spending. Last year, the government announced it would boost aid in the region by 714 million New Zealand dollars ($484 million) as part of its "Pacific Reset" strategy -- a move commentators said was at least partly driven by China's growing influence in the area.
"Our eyes are wide open to New Zealand's decreasing influence in the Pacific and we are committed to resetting our approach to working with the Pacific," Deputy Prime Minister Winston Peters said in June last year.
Despite the numerous points of friction, Stephen Jacobi, the executive director of the New Zealand China Council, isn't panicking. Instead, Jacobi said, the biggest fear is that tiny New Zealand becomes irrelevant.
"The reality is we are a small country and the Chinese don't get up every day thinking about how they can do nice things for New Zealand," he said. "That means we need to be careful in the way we do things -- but we are never going to agree on everything with China."