John Adams was the second president of the United States, serving from 1797 to 1801. During his presidency, he faced an undeclared naval war with France known as the Quasi-War and passed the controversial Alien and Sedition Acts. Adams sought to avoid honors and offices, preferring a quiet life on his farm instead. His presidency ended after one term as his rival Thomas Jefferson defeated him in the 1800 election.