Image caption Canadian agencies shut off internet access after discovering the security breach

Canadian government servers have been struck by a cyber-attack reportedly traced to China-based computer servers.

Hackers gained access to secret government data, the CBC reported, and forced the finance department and Treasury Board to cut internet access.

The attack was first discovered by cyber-security agents in January. Beijing on Thursday denied involvement.

CBC cited Canadian officials saying it was unclear if the attack originated in China or was routed through there.

"The allegation that the Chinese government supports internet hacking is groundless," Chinese foreign ministry spokesman Ma Zhaoxu told reporters.

The Canadian Treasury Board said in a statement it had detected an "unauthorized attempt to access its networks".

"There are no indications that any data relating to Canadians was compromised," a spokesman for Treasury Board minister Stockwell Day told Reuters news agency.

The CBC reported that internet access at the two agencies was shut off after the breach was discovered, in an effort to stop the hackers from pilfering data.

The CBC also said the hackers gained control of senior government officials' computers in an effort to steal passwords that unlock government data systems.

The hackers also reportedly targeted Defence Research and Development Canada, a civilian agency of the national defence department.