Following the war Hartranft switched party allegiances and became a
Republican. He was appointed to serve in former general
John W. Geary's Pennsylvania administration as Auditor General from 1867 to 1873. Hartranft was elected as governor in
1872. He was a strong advocate of education, municipal reform, regulation of banking, improved industry and commerce, and the reorganization of the
National Guard. He supported
suffrage for African Americans, fought the corrupt
Simon Cameron political machine, and championed the rights of the workingman. During his administration, the revision of the Commonwealth's constitution was completed and ratified as the Constitution of 1873. It prohibited special and local legislation; and increased the terms for state legislators: House terms were increased to two years instead of one, and Senate terms to four years from three. He was elected as a member of the
American Philosophical Society in 1876. He was the 5th commander-in-chief of the Union veterans' organization, the
Grand Army of the Republic, serving from 1875 to 1877. He was also a member of the
Military Order of the Loyal Legion of the United States. The
United States celebrated its
centennial as a nation in 1876. Hartranft saw that Pennsylvania led the way in the celebration that was centered in
Philadelphia's Fairmount Park. At the
Republican National Convention in June 1876, he was a contender for the presidential nomination, but
Rutherford B. Hayes of
Ohio was eventually selected. He had served with Hartranft during the Civil War in the same army corps. During his second term,
economic depression, low wages in industry and
unemployment, following the industrial boom of the early 1870s, resulted in national labor unrest and strikes culminating in the
Great Railroad Strike of 1877. Serious
civil disturbances included riots associated with the railroad and general strikes of 1877 in several industrial cities: including Philadelphia, Pittsburgh, Reading and Scranton. There were other incidents with the
Molly Maguires in the
anthracite coal regions. Hartranft called out the state militia and then
Regular Army troops to maintain order. In
Philadelphia,
Reading, and
Pittsburgh, fires were set and extensive railroad facilities and equipment burned, especially in Pittsburgh. Eleven people died along the
Schuylkill River before Federal troops restored the peace. Hartranft later proposed recognition of
labor unions and arbitration of claims. Concerned with the governor's precedent in calling out the militia to battle civilians in Pittsburgh, the
District Attorney of
Allegheny County tried to force Hartranft to appear before a
grand jury to explain his rationale. The courts backed Hartranft when he refused to appear. Their ruling became known as the "Hartranft Decision." grounds Hartranft returned to his home in Montgomery County in 1879, where he accepted the position of US
Postmaster. He was subsequently appointed as Port Collector for Philadelphia (1881–1885). He was also reappointed to command the
Pennsylvania National Guard, which he had helped develop. On August 26, 1886, Hartranft was awarded the Medal of Honor for valor during the
First Battle of Bull Run in 1861. John Hartranft died in Norristown and was buried in
Montgomery Cemetery in
West Norriton Township, Pennsylvania, near
Norristown. The Pennsylvania National Guard later provided an
obelisk for his grave. He was succeeded as commander of the
Pennsylvania National Guard Division by
George R. Snowden. ==In memoriam==