Rafferty moved to
New Germantown, New Jersey, and took up residence at Barnet Hall, the home of his father-in-law, and engaged in agriculture and milling. In 1855, Rafferty was elected to the
New Jersey Senate to represent
Hunterdon County and served in that role until 1859. He was a delegate of the
1860 Democratic National Convention. In 1862, Rafferty moved to
Flemington and practiced law there. In 1863, he became licensed as a counselor and was appointed by governor
Joel Parker as military agent for New Jersey in the
American Civil War. He served in that role for three years in
Washington, D.C., until March 1866. From 1867 to 1869, he was county superintendent of schools in Hunterdon County. In 1870, he served again as secretary of the senate. In 1872, he was appointed to fill a vacancy in the Court of Common Pleas. In 1877, he became prosecutor of the pleas for Hunterdon County. He served in that role until his death. ==Personal life==