The incident occurred last night on Agra-Bareilly National Highway when the farmers were going to Agra Mandi with the truck filled with tomatoes for selling, police said today.
The deceased were identified as Satyapal (30), Kitab Singh (37), Fannu (28) and Jitendra (15), they said.
While the 17 injured were rushed to a hospital, four of them who are serious were referred to a hospital in Agra, they said.
The farmers belonged to Madhupura village in Malavan police station area, they said.