Mosby learned from his mistakes, and Mosby's Rangers became a constant concern for Union commanders in Virginia. General Ulysses S. Grant narrowly escaped capture by Mosby's men, and decided to avoid traveling to Washington from his headquarters with the Army of the Potomac. During September and the first half of November 1864, Mosby claimed to have captured "not less than seven hundred prisoners". Two of Sheridan's division commanders, General George Custer and General William H. Powell, became especially frustrated with Mosby. Retaliations and injustices occurred (depending on one's point of view), and Powell threatened to execute 22 prisoners for every one of his men he considered murdered by outlawed guerrillas. After receiving a letter from Mosby, Sheridan agreed to a truce in the brutality committed by both sides against prisoners. Although more attempts were made to eliminate Mosby's Rangers, the Rangers were active until the end of the war. After the war was over, Mosby became a Republican and worked several jobs for the U.S. government. He died in 1916 and is buried in Warrenton.