OTTAWA -- Defence Minister Peter MacKay said he laid down clear "markers" Monday in talks in Beijing on how to curb cyberattacks originating in China.

MacKay told his counterpart, Gen. Chang Wanquan, that Canada expects China to establish a "greater rapport" with other countries and play by a "rules-based framework" on the Internet.

"I did lay down markers with my defence counterpart here in China, made if very clear that this is an issue of real concern to Canada," MacKay said in a telephone interview from Beijing, where he became the first Western defence minister to hold talks with China's new defence minister on his home turf.

"It is obviously the issue of deliberate hacking and invading systems for nefarious purposes that we're concerned about."

MacKay said he encouraged China "to become more engaged in a rules-based framework that protects critical infrastructure, that protects systems throughout the world and allows for the free flow of information."

MacKay delivered his message days before cybersecurity issues come to the fore at a summit at a California resort between U.S. President Barack Obama and Chinese President Xi Jinping.

MacKay's visit also came two days after he saw Chuck Hagel, his U.S. counterpart, issue a stern public warning to China about cyberattacks at a large security symposium in Singapore.

"The United States has expressed our concerns about the growing threat of cyber-intrusions, some of which appear to be tied to the Chinese government and military," Hagel told the International Institute for Strategic Studies' Asia Security Summit.

Hagel was immediately challenged in the public forum by Chinese officials who were in attendance.

MacKay, who attended the Singapore summit prior to his trip to Beijing, said he took note of Hagel's pointed comments and asked various ministers at that gathering "whether they had certain messages and certain issues that they wanted conveyed or addressed" in Beijing.

MacKay, now NATO's longest-serving defence minister, will report back on his China discussion to his 27 alliance counterparts when they meet Tuesday in Brussels, where cybersecurity is expected to be the major topic.

MacKay was non-committal when asked whether he shares the view that the Chinese government is participating in the hacking, or is simply failing to control the activity of others.

MacKay said his Chinese counterpart noted his country has also been the victim of hackers, a view that he noted is often met with "a lot of skepticism." MacKay said his message was received with an "open ear" in what was described as frank talks.

Whether or not the Chinese government is involved in hacking, it still needs to control what goes on its cyberspace, MacKay said.

"It's like terrorism. It's like domestic criminal activity when it starts to spill out across your borders," he said.

"Piracy is another example where it requires yes, vigilance, from within your own territory, but a recognition that if it's originating in your country there is an explicit responsibility that falls to a country to address it."

MacKay said he was hopeful that there could be a "correction" in the cybersecurity threat emanating from China if the country is continually pressed on the issue from a variety of sources.

The Harper government is trying to deepen economic co-operation with China, and is particularly keen to sell Alberta oil to the country. China, meanwhile, is a willing buyer because it needs energy sources to feed its massive economy.

China's state-owned enterprises have invested heavily in the oilsands, notably the $15-billion takeover of Calgary-based Nexen by China National Offshore Oil Corp. late last year. They are also keen to invest in the Northern Gateway pipeline, which would ship oilsands bitumen to tankers on Canada's West Coast.

MacKay said he had no way of knowing whether his messages on cybersecurity carried any extra weight with Beijing because of their interests the Canada's energy sector.

But he said: "When you're engaging with a country like China, and we do $70 billion worth of trade with China, when they obviously do have energy needs, and needs in other areas, inevitably there's a calculation that countries go through."