 He was president judge of the thirteenth judicial district of Pennsylvania from 1861 until March 4, 1865, when he resigned to enter Congress.Mercur was elected as a Republican to the Thirty-ninth and to the three succeeding Congresses and served until his resignation on December 2, 1872.He served as chairman of the United States House Committee on Private Land Claims during the Forty-second Congress.