A French man who hacked into the twitter accounts of Britney Spears, Lily Allen and Barack Obama has been arrested.

Francois Cousteix - who went by the online name of Hacker Croll - has been charged and released on bail after a joint effort between the FBI and French police tracked him down.

Francois - who claims he is "a nice pirate", despite accessing dozens of private social networking pages of celebrities - had managed to access the personal accounts by guessing the answers to their security questions which users are asked if they cannot remember their password.

Francois, 25, said: "I am not a hacker. I did not want to destroy anything."

If he is found guilty of illegally accessing a computing system, unemployed Francois faces up to two-years in prison sentence and a fine of 30,000 Euros.

Francois - who has no specialist computer training - also claimed he had gained access to Facebook and Google accounts, saying his motivation was simply to prove he could do it.

He said he had accessed the accounts with the passwords he found by studying published information enabling him to correctly answer security questions put to users who have forgotten their passwords. Common questions include 'What is the name of your juinor school?' and 'What is your date of birth?'.

Jean-Yves Coquillat, state prosecutor in Auvergne, where the hacker lives, said: "He acted as the result of a bet. He is not a hacker in the strict sense of the word. He entered a house where the door was open."

Francois will stand trial in June.