Hampshire Police have detained missing sex offender Stephen Munden.
They had investigated more than 100 reported sightings, including some in the Fareham area, since he went missing from Winchfield Hospital, near Hook.
An investigation is being carried out into how Munden got out of the hospital at around 6.15pm on Tuesday.
Munden was detained at the facility under a hospital order after being sentenced last year for possessing, making, and attempting to make indecent images of children and sexual assault on a child under 13.
Hampshire Constabulary said Munden handed himself into police in Thames Valley at about 0.45am today.