After the success of "A History of New York", Irving searched for a job and eventually became an editor of "Analectic Magazine", where he wrote biographies of naval heroes such as James Lawrence and Oliver Perry. He was also among the first magazine editors to reprint Francis Scott Key's poem "Defense of Fort McHenry", which was immortalized as "The Star-Spangled Banner". Irving initially opposed the War of 1812 like many other merchants, but the British attack on Washington, D.C. in 1814 convinced him to enlist. He served on the staff of Daniel Tompkins, governor of New York and commander of the New York State Militia, but he saw no real action apart from a reconnaissance mission in the Great Lakes region. The war was disastrous for many American merchants, including Irving's family, and he left for England in mid-1815 to salvage the family trading company. He remained in Europe for the next 17 years.