A pervert who sparked a five-hour rooftop stand-off with police has admitted two charges of trying to meet an under-age girl for sex.

The confrontation between Paul Farrell and a group of paedophile hunters was live-streamed onto Facebook after he climbed on the roof of a property in Ripon Street in Halifax in June.

The footage captured Farrell exchanging insults with people in the street below and he allegedly hurled tiles off the roof as police officers urged the group to stop filming.

Police set up a cordon around the scene and negotiators attended the incident along with ambulance and fire crews.

At an earlier hearing at Bradford Crown Court Farrell, of no fixed abode, pleaded guilty to damaging roof tiles at the house, but he denied the sexual offences.

His case was due to be tried at the crown court today, but when he was brought into the dock from custody Farrell pleaded guilty to two offences of attempting to meet a girl under 16 after sexual grooming.

A man on a roof during a stand-off with police in Ripon Street, Halifax.

The court heard that Farrell will have spent about six months in custody by the time he is sentenced at the end of this month and the Recorder of Bradford Judge Jonathan Durham Hall QC suggested that he could consider a lengthy community order or a suspended sentence order after a report on Farrell has been prepared by the probation service.

Farrell was remanded back into custody until his sentence hearing on November 28.