The Canadian government's public website for applying for social services and downloading official forms was briefly shut down Wednesday in a cyberattack claimed by the Anonymous group, AFP reported.

Several other government websites including those of Parliament, Industry Canada and Public Works also appeared to be down, according to the news agency.

"Confirmed today that the Govt of Canada GC servers have been cyberattacked," Treasury Board President Tony Clement said in a Twitter message.

Anonymous later took responsibility for the breach in an online video, saying it was done in protest of a controversial anti-terror law that dramatically expands the powers and reach of Canada's spy agency.

Bill C-51, said the hacker group, violates Canadians' civil rights, and targets "minority groups and dissidents."

"Do we trade our privacy for security?" asked an electronically masked voice in the video.

The bill was enacted in response to the first terror attacks on Canadian soil last October, when a gunman killed a ceremonial guard and stormed parliament, and a soldier was run over in rural Quebec.

It has been widely decried as overreaching and an unprecedented assault on civil rights.

The bill, according to AFP, criminalizes the promotion of terrorism, makes it easier for police to arrest and detain individuals without charge and expands the Canadian Security Intelligence Service's (CSIS) mandate from intelligence-collection to actively thwarting terror plots and spying outside Canada.

Anonymous is responsible for several large hacking attacks in recent years and has also threatened Israel with massive cyberattacks which have mostly been a failure.

Another notorious group of hackers is the Syrian Electronic Army, a pro-Syrian regime group which aims to spread counter-revolutionary propaganda and hits back at news  outlets it says slant their reporting of the Syria conflict.