He joined the Seventeenth Infantry Regiment of the United States Army as a Second Lieutenant in 1899, after the United States had occupied the Philippine Islands in the Spanish–American War. In the course of nearly four years in the Philippines, he served under General Arthur MacArthur, Jr., was on the staff of General Leonard Wood during the Moro rebellion, and commanded a battalion of Philippine Scouts. He resigned from the Army in 1905 with the rank of captain and became New York's First Deputy Commissioner of Police in January 1906, at the age of 28.