An 18-year-old British man arrested on suspicion of being a spokesman for hacking groups LulzSec and Anonymous was granted bail when he appeared in a London court on Monday.

Jake Davis is charged with hacking into websites, including that of Britain's Serious Organised Crime Agency (SOCA), which was out of service for several hours on June 20 after apparently being targeted.

Davis was arrested on Wednesday at his home on the Shetland Islands, north of the Scottish mainland.

He faces five charges, including conspiring to carry out adistributed denial of service attack on SOCA, the British equivalent of the FBI. Such attacks flood websites with traffic to make them crash.

Davis wore a grey-blue shirt and a black T-shirt and clutched a book as he appeared in the dock at the City of Westminster Magistrates Court in London.

He appeared relaxed and spoke only to confirm his name and date of birth.

District Judge Howard Riddle told the teenager he will have to appear in Southwark Crown Court in London on August 30 and granted him bail with stringent conditions and a curfew attached.

He is barred from using the Internet or having access to any computer or mobile phone and must remain indoors from 10:00 pm to 7:00 am at his mother's home in Lincolnshire, eastern England.

The alleged hacker is said to use the online nickname "Topiary" and present himself as a spokesman for LulzSec and Anonymous.

LulzSec has claimed responsibility for a 50-day rampage earlier this year against international businesses and government agencies, including the Central Intelligence Agency and Senate in the United States and electronics giant Sony.

Another alleged British member of the group was released by a court on bail in June after being diagnosed with autism.

Ryan Cleary, 19, has been charged with offences including hacking into the SOCA website.