A group of people threw stones and bottles at the car of Congress candidate from Adampur assembly seat Jai Prakash when he came out of the counting centre set up at Mahavir Stadium here on Sunday.
A window glass of the car were broken in the attack, which began just as police and Prakash's supporters took his vehicle out.
No one was hurt in the incident, said officials.
In his complaint lodged with the Superintendent of Police, Prakash accused BJP leader Kuldeep Bishnoi’s supporters of carrying out the attack and demanded an action against them.
BJP's Bhavya Bishnoi on Sunday won the Adampur assembly segment defeating Prakash by a margin of 15,740 votes. Bhavya, 29, is the grandson of former Haryana Chief Minister Bhajan Lal.
The by-election was necessitated after Kuldeep Bishnoi, Bhavya’s father, left Congress for BJP.
Bhavya polled 67,492 votes, while Prakash secured 51,752 votes.