In 1776, forces under his command repulsed a British attempt to capture Charleston, which boosted his standing with the army and Congress. Later that year, he was captured by British cavalry under Banastre Tarleton; he was held by the British as a prisoner until exchanged in 1778. During the Battle of Monmouth later that year, Lee led an assault on the British that miscarried. He was subsequently court-martialed and his military service brought to an end. He died in Philadelphia in 1782.