China's outspoken ambassador to Canada softened his tone during his farewell speech earlier this week, noting recent tension between the two countries is only "temporary."

Lu Shaye made the comments in Ottawa before about 400 people from the Chinese community, including overseas students and Chinese-funded institutions, just days before the G20 summit in Japan. A copy of his statements were later posted on the Chinese Embassy's website.

"Thick mountains could not stop the river from flowing into the sea," Lu said in Mandarin.

"The current difficulties facing China-Canada relations are only temporary… The Sino-Canadian friendship has a deep, profound history, a history that is unstoppable."

Lu is leaving his current position for another posting.

He noted in his comments earlier this week that while he "experienced the most ups and downs" of his diplomatic career while serving in Canada, "the noise of a ruined friendship between China and Canada will eventually become history."

The embassy added "the atmosphere of the reception was warm and touching."

Watch as Trudeau and Xi sit next to each other

Canadian Prime Minister Justin Trudeau and Chinese President Xi Jinping were seen on the first day of the G20 summit in Japan sitting together for a working lunch, but not interacting 0:59

It's a notable shift from Lu, who has often played a combative role throughout the ongoing dispute between Canada and China, and once described the relationship as hitting "rock bottom."

Trudeau and Xi meet at G20

The two countries have been at odds since December, when Canadian authorities detained Meng Wanzhou , chief financial officer of the Chinese telecom giant Huawei, on an extradition request from the United States.

Soon after, Chinese authorities detained Canadian citizens Michael Spavor, a businessman, and Michael Kovrig, a Canadian diplomat on leave to work for a non-governmental organization.

Federal officials in Canada are also still weighing whether to allow Huawei access to Canada's 5G wireless network, adding stress to the relationship.

In a news conference in January, Lu said there would be " repercussions " for Canada if Huawei is rejected on national security grounds. In a newspaper op-ed that same month, he said the international community's treatment of China reflected an attitude of " white supremacy ."

Watch as Trudeau and Xi briefly interact after sit-down

After the G20 leaders' working lunch, Canadian Prime Minister Justin Trudeau and Chinese President Xi Jinping chatted — away from the cameras 0:31

Prime Minister Justin Trudeau had "brief, constructive interactions" with Chinese President Xi Jinping on the first day of meetings at the G20, according to his office. It's the first time they've spoken since the two Canadians were imprisoned.

Video footage from a working lunch on Friday showed the two leaders sitting beside each other, but not interacting for several minutes while cameras were positioned on them. Trudeau could be seen making an effort to interact with Brazilian President Jair Bolsonaro, located on his other side.

Trudeau and Xi greeted each other prior to the interaction in the footage, government officials said.

Lu's departure leaves both China and Canada without an ambassador.