The hacking group Anonymous says it attacked British government websites in retaliation for authorities' treatment of WikiLeaks founder Julian Assange.

Websites affected include the Ministry of Justice and the Home Office.

Anonymous said on Twitter it had launched the attacks in support of Mr Assange, who is holed up in the London embassy of Ecuador.

A Ministry of Justice spokeswoman said its website had been experiencing some disruption.

"This is a public information website and no sensitive data is held on it. No other Ministry of Justice systems have been affected," she said.

A similar attack was made on the website of British prime minister David Cameron, but it failed to bring the site down.

The Home Office denied its website was hacked.

"It was targeted by protesters on Monday night but only experienced very minor interruption to the service," a spokeswoman said.

"We had measures in place to protect the site and no other Home Office systems were affected."

Mr Assange was granted asylum by Ecuador last week, but Britain says he will be arrested as soon as he leaves the embassy and be extradited to Sweden to face sexual assault allegations.

Swedish prosecutors are refusing to interview Mr Assange inside the embassy, and Ecuador's president Rafael Correa says Sweden is being deliberately intransigent.

"What is the problem? That they won't guarantee not to extradite Julian Assange to a third country," he said.

"The moment that Julian Assange is extradited to a third country, the United States for example, then his life is in danger because the US would prosecute him for political crimes and they have the death penalty."

ABC/AFP