Around 5,000 farmers took part in a rally at Karjat to protest against the laying of a gas pipeline on their farm lands by a private company.