The accused took the girls, both 7-8 years old, to his house in Shamli district and tried to rape them yesterday, Kandhla police station SHO O P Choudhary said.
On hearing the girls' cries, neighbours rushed to the house and beat up the accused.
Later, he was handed over to police.
Police have registered a case under relevant provisions of the IPC and the Protection of Children from Sexual Offences (POCSO) Act.