Bareilly City Magistrate Alankar Agnihotri resigned from service on Monday, citing deep disagreement with government policies, especially the new UGC regulations, which he said could foment caste-based discontent, officials said.