A 22-year-old man has pleaded guilty to attempting a homicide bomb attack on a family restaurant.

Nicky Reilly pleaded guilty at a London court Wednesday to attempted murder and engaging in preparation for terrorism by researching how to make bombs.

Reilly is a convert to Islam who police say has a history of mental illness. He was arrested shortly after a blast rattled a family restaurant in the southwest English city of Exeter 200 miles west of London on May 22.

Witnesses reported seeing Reilly enter the restaurant's bathroom shortly before the blast. A photo released by police showed a bloody-faced Reilly being approached by officers shortly afterward. He was the only person wounded in the blast.