The Canadian prime minister was in need of a new friend with a big appetite for oil. The Americans just weren't cutting it.
It was February 2012, three months since Barack Obama had phoned Stephen Harper to say the Keystone XL pipeline, which was designed to carry vast volumes of Canadian oil to US markets, would be delayed.
Harper found himself on the banks of the Pearl River promoting Plan B, a pipeline from Alberta's landlocked oil sands to the Pacific coast, where it could be shipped in tankers to a country certain to take it - China.
It was a country to which he had never warmed, yet served his current purposes.
Harper stood before a business audience in a luxury hotel banquet hall in Guangzhou, putting on his best pro-China face while touting his nation's virtues.
"Canada is not just a great trading nation. We are an emerging energy superpower," he said, surrounded by a phalanx of red Chinese and Canadian flags.
He noted that a single country - the US - took 99 per cent of Canada's exports, a situation he described as contrary to Canada's commercial interests.
"We want to sell our energy to people who want to buy our energy. It's that simple," he said.
The Chinese and Canadians there had long waited for Harper to embrace the Chinese economic juggernaut.
They delayed him for half-an-hour posing for pictures. As he finally took his seat for a group photo with the organisers, he turned to Peter Harder, a former deputy minister of foreign affairs and president of the Canada China Business Council.
"Do you think the Americans were listening?" he asked.
That Harper turned to China while trying to sell Alberta's oil spoke volumes about the depth of his frustration with Obama.
Harper's view, according to people close to him, was that sensible Americans would understand the folly of allowing Canada's massive oil sands reserves, estimated at 168 billion recoverable barrels, to be sucked up by China, a rising economic rival.
Yet if the Americans - most particularly a president inclined to indulge his green base at Canada's expense - didn't pay heed, then Harper had primed the pump to do business with China.
Important elements of his Conservative party either shared Harper's misgivings about China's human rights record and repression of religion, or were downright hostile to the country.
In British Columbia, with its zest for environmentalism, green and aboriginal groups had already emerged hostile to the idea that its pristine lands might be risked for a pipeline, known as Northern Gateway, to feed China's fossil-fuel-propelled growth - never mind how supertankers might damage the province's postcard coasts. But Canada's Plan B rejoinder to Obama's repeated Keystone delays became mired in problems, jeopardising future oil sands development and production at a cost, according to a Calgary research group, of more than C$400 billion (HK$2.8 trillion) in lost economic growth over the next 25 years.
Jason MacDonald, Harper's director of communications, said it "would be inaccurate to suggest that any one pipeline project constitutes a 'plan'". A spokesman for China's ambassador to Canada did not return calls seeking comment.
Harper said he couldn't discuss Gateway, yet was confident that "over time" one of several proposed projects to move oil sands production to the Pacific or Atlantic coasts would go forward.
Ultimately, Harper's cabinet has the final say as to whether the 1,177-kilometre, C$6.5 billion Gateway project is approved. A decision is required by the middle of next month.
To kill it could undermine his arguments that Keystone ought to be built, arming anti-Keystone factions with a powerful argument that Canada isn't willing to practice what it preaches to Obama. To approve it risks a political and legal brawl.
Some green and aboriginal groups are already sounding warnings of massive civil disobedience and lawsuits against the pipeline in British Columbia.
Mixed messages to China by the Harper government have also frayed relations between the two countries and reduced Chinese enthusiasm for doing business.
"We're long on rhetoric and short on strategic thinking and planning," said Wenran Jiang, a China specialist at the University of Alberta and a consultant for the Alberta government and energy industry. "You can't engage the second-largest economy in the world in such a way," he said.
Harper's outreach on that February day in Guangzhou masked a raw ambivalence towards China - and not just over human rights and religious repression.
According to his security services, Harper was also critical of China's espionage activities and intimidation of dissidents within Canada.
Against this "principled" Harper stood Harper "the realist". The oil industry, centred in his home province of Alberta, increasingly recognised it needed new markets for its oil.
When first elected prime minister, Harper firmly embraced an anti-China wing of his party, adopting their belief that China needed Canada and its resources more than Canada needed China, according to advisers.
This led to an approach often described internally as cold diplomacy with warm economics. Harper showed his colours on his first Asia trip in November 2006 for an Asia-Pacific summit in Hanoi.
The plan was for the poorly travelled prime minister to keep a low profile, observe and learn, sources said.
Harper said he believed previous Canadian governments had been too accommodating to China. On the first leg of the journey, he wandered to the back of the plane and told reporters, in a reference clearly aimed at China, that Canadians didn't want his government to sell out to "the almighty dollar".
The remark, filed by reporters during a refuelling stop in Alaska, landed like a bombshell.
Chinese officials had already taken umbrage over the new Canadian government granting honorary citizenship to the Dalai Lama two months earlier.
They cancelled Harper's scheduled one-on-one with the then president, Hu Jintao . Harper ordered his advisers to reschedule the meeting. The Chinese, still fuming, finally consented to what diplomats call a "pull-aside". If Harper wanted to meet Hu, the Chinese said, he could partake of a brief conversation just outside the men's bathroom. As the internal debate over China continued, the second question - how to get oil to Asia - still hung out there. The trade route from the oil sands to China ran through British Columbia.
It was as green as you get, being, among other things, the birthplace of the environmental group Greenpeace.
Also, few British Columbia aboriginal groups have settled treaties with the government, meaning the proposed Gateway route would have to traverse vast swathes of still disputed land claimed by First Nations, as aboriginal groups in Canada are called.
Gateway was the brainchild of Pat Daniel, who floated it soon after becoming Enbridge chief executive officer in 2001 and was still on the scene in 2012, meeting Harper for the first time on the China trip.
Long before anyone else, Daniel could see what he called "a big wave of oil sands crude coming towards us" that the existing marketplace was unlikely to absorb. A pipeline from the Alberta oil sands to the Pacific Ocean could change that.
The oil executives, however, would soon discover they had a lot to learn about British Columbia's raucous environmental and aboriginal politics.
Centred in Hartley Bay, the Gitga'at tribe is known for three things - their courage, hospitality and a visceral love of their lands and water.
Today, the community of 200 is plastered with "no tankers" signs along the wooden boardwalks. The foyer of the school is adorned with ceremonial canoe paddles, cedar-fibre weavings and student presentations encouraging fellow residents to "defend our planet against attacks by corporations like Enbridge."
Harper's embrace of China started with the 2008-09 economic meltdown. It made plain that China was simply too influential to keep at arm's length.
Canada's share of trade and investment were falling and the Beijing leadership had withheld an economically significant tourism designation from Canada.
The 2009 trip started with a verbal settling of scores. "This is your first visit to China and this is the first meeting between the Chinese Premier and a Canadian prime minister in almost five years," then-premier Wen Jiabao publicly scolded Harper. "Five years is too long a time for China-Canada relations."
According to David Mulroney, Harper's hand-picked ambassador, China was frustrated by Canadian policy. It had invested in Australia with positive results and wanted to diversify to Canada. It had been waiting for Harper to come around.
Post-Guangzhou, Harper's changed tone had become clear. In 2007, he made a fuss over the Dalai Lama, including a rare photo-opportunity in his Parliament Hill office, despite knowing it would annoy the Chinese.
In 2012, with the Dalai Lama again in Ottawa two months after the Guangzhou speech, Harper kept it to "a private courtesy meeting" of 20 minutes.
Meanwhile, there is a Plan C should Gateway be stalled. It involves shipping oil sands production through a series of existing and new pipelines across Canada to the large Irving Oil refinery on the Atlantic coast for export, along with a proposal to twin an existing pipeline that runs from Alberta into the port of Vancouver.
Along with oil-by-rail and increases in capacity to other US-bound pipelines, the oil sands is feeling some temporary relief.
Still, eight years after a rookie prime minister first laid out his energy vision for Canada, the country remains more energy warehouse than energy superpower, said Wendy Dobson, a pipeline company director who runs the Institute for International Business at the University of Toronto.
She and former ambassador Mulroney both see a real risk of change in the Chinese energy market before Canada moves on Gateway. Jiang says the Chinese will not sit around. "They are actively pursuing everything at the same time," he said
As with Keystone, the stakes are high for Canada and for Harper's energy superpower goal.
Natural Resources Minister Joe Oliver, who has lived the issue more closely than anyone, considers the pipeline challenges "pivotal to our economic future".
Without a major new outlet for the oil sands, which he said was "unthinkable", the resources would be stranded. He added: "There will be negative, if not dire, economic consequences."