A close-up view of a U.S. visa. Courtesy of Pixabay

A federal judge on Monday struck down a $100,000 fee that U.S. President Donald Trump imposed on new H-1B visas for highly skilled foreign workers, concluding that it constituted an unlawful tax that Congress never authorized.

U.S. District Judge Leo Sorokin in Boston issued the ruling in a lawsuit filed by 20 Democratic state attorneys general challenging a fee Trump announced in September that dramatically raised the cost of obtaining H-1B visas.

The H-1B program offers 65,000 visas annually, with another 20,000 visas for workers with advanced degrees, approved for three to six years. Employers seeking a visa for a foreign worker before Trump's proclamation typically paid about $2,000 to $5,000 in fees depending on various factors.

The increase in fees has discouraged H-1B visa requests, according to court filings. As of February 15, U.S. Citizenship and Immigration Services had received just 85 payments of the $100,000 fee, the administration said in a March filing.