sentences:  During the Civil War, he served in the Union Army from 1862 to 1864, moved to Topeka, Kansas in 1865 and served as prosecuting attorney of Shawnee County, Kansas from 1865 to 1873.Ryan was Assistant United States Attorney for Kansas from 1873 to 1877, was elected a Republican to the United States House of Representatives in 1876, serving from 1877 to 1889 and was appointed Ambassador to Mexico by President Benjamin Harrison in 1889, serving until 1893.He was appointed Assistant Secretary of the Interior by President William McKinley in 1897, serving until 1907 when he was sent to Muskogee, Oklahoma as the personal resident representative of the Secretary of the Interior which he served as until his death in Muskogee on April 5, 1914.