In the Revolutionary War, one of General George Washington's most effective weapons against the British was an African American slave named James Armistead. Armistead was enlisted as a patriotic spy who worked as a "double-agent" on behalf of the United States. Pretending to be a runaway slave, Armistead was able to infiltrate the British defenses and acquire countless important British war secrets which helped turn the tide of the Revolution in favor of the Americans. Marquis de Lafayette helped him by writing a letter of recommendation for his freedom, which was granted in 1787. In gratitude, Armistead adopted Lafayette's surname and lived as a farmer in Virginia until his death in 1830.