The protesting farmers squatted on railways tracks for hours, prompting the railway authorities to stop Haridwar passenger train at outer station. But the protesters reached there and jumped on the engine and started raising slogans, police said.
Police then resorted to lathicharge to bring the situation under control. Several framers were injured in the incident.
Senior Superintendent of Police, Sharanpur, Nitin Tiwari, said police took action against people, who broke the law.
"They staged protest after mill authorities refused to listen to their problem," he added.