LONDON—A British teenager accused of attacks on a series of websites is being kept in custody until a Monday bail hearing.

Ryan Cleary was granted bail by City of Westminster Magistrate’s Court on Saturday, but prosecutors have appealed the move, meaning he must remain behind bars.

The 19-year-old is accused of a series of cyberattacks last year linked to the amorphous hacking group known as Anonymous and a more recent attack on the website of Britain’s FBI equivalent, the Serious Organized Crime Agency.

If he’s granted bail Monday it would be on condition that he not access the Internet.