Here:
As a 22-year-old law student in Williamsburg, Virginia, Jefferson bought a Qur’an – 11 years before drafting the Declaration of Independence. The purchase is symbolic of a longer historical connection between American and Islamic worlds, and a more inclusive view of the nation’s early, robust view of religious pluralism.
An older, wiser Jefferson, along with Madison, realized peace was better than war, but that war was better than paying tribute to Muslim pirates in exchange for it, something America ignobly did for fifteen years between 1785 and 1800.