According to police, Anand Singh Patel was having a land dispute with his neighbour Bechan Singh Gaur and was frustrated over the matter.
Out of frustration, the man attacked his wife Pramila (35), daughter Anjali (16) and son Aditya (18) with a sword at his residence in Kushinagar area. After this, he entered his neighbour's house and attacked Gaur (60), his wife Malti (55), son Vijay (30) and his wife Poonam (28).
While Anand's wife, Gaur and his son died on the spot, Anjali died during treatment, police said.
Anand has been arrested and the sword used in the killings have been arrested, they said.