After the XYZ Affair of 1797, the United States was on a path to war with France. Anti-French feelings and fears of political dissent were widespread. As a result, the Federalist-majority Congress passed two sets of laws intended to limit immigration and curb free speech and the press.
Laws under the Alien Act placed restrictions on aliens. An alien is a foreigner living in another country. Many aliens lived in the United States and wanted to become naturalized citizens. The laws increased the waiting period for naturalization from 5 to 14 years. This change was intended to prevent French and Irish immigrants, who tended to support the French, from becoming citizens during the run-up to the anticipated war. The Alien Act also gave the president the authority to deport or imprison foreigners he considered dangerous. While these laws enjoyed wide support, some people thought the Alien Act did not reflect the reputation of the United States as a nation of immigrants. In the end, the Alien Act was never enforced.
The Sedition Act took aim at the 1st Amendment rights of free speech and of a free press. Under the Sedition Act, a citizen could be fined or sentenced to jail for defaming an elected official or protesting against Congress or the president. Under these laws, 25 citizens, including several newspaper editors and a congressperson who insulted President Adams, were arrested and tried. While the laws of the Sedition Act violated the 1st Amendment, the Federalist-packed Supreme Court let them stand.
After the threat of war had passed and Thomas Jefferson was elected president in 1800, the Alien and Sedition Acts were repealed or allowed to expire.