CNN  — 

Just days after Maryland became the first state in the country to impose a tax on digital advertising targeting Big Tech, lobbying groups representing companies including Amazon, Facebook, Google are trying to stop it.

In a lawsuit filed Thursday, the groups allege that the state law is “deeply flawed” as well as “unlawful” and “unconstitutional.” They also allege that it serves to discriminate against interstate commerce and interferes with foreign affairs, citing the federal government’s prior opposition to countries imposing taxes on US digital platforms.

The lawsuit, filed in a Maryland federal district court, is being brought by several lobbying groups including the US Chamber of Commerce and the Internet Association, the latter of which was founded by Google, Amazon, eBay, and Facebook.

The Washington Post was first to report the lawsuit.

“The digital ad tax is illegal and should be struck down,” said an attorney for the plaintiffs, Stephen Kranz of McDermott Will & Emery LLP, in a statement to CNN Business. “If Maryland wants to tax advertising there is a legal way to do so – they did not even attempt to go down that road.”

The bill, which was enacted Friday after the state’s senate voted to override the governor’s veto, was believed to mark the beginning of a wave of similar legislation across the country. The new tax comes as policymakers increasingly target the economic dominance of large tech platforms, some of which have built massive digital advertising businesses.

The bill is expected to raise an estimated $250 million in its first year, with revenues being earmarked for education. Senate President Bill Ferguson (D), a chief proponent of the bill, is a former teacher for Teach for America.

“While unsurprising, it’s disappointing to see these companies spend millions on high powered attorneys instead of paying their fair share,” Ferguson said in a statement provided to CNN Business on Thursday. “For two decades, these companies have grown exponentially by availing themselves of the privileges of states, benefited from the aggressive uncompensated collection of personal and private information about Maryland’s residents, and been free riders to Maryland’s investments in our civic infrastructure. All of this while contributing nothing to the future of Maryland’s residents.”

Ferguson had said the bill targeted companies that make more than $100 million a year selling digital advertising; Facebook and Google generated $84 billion and $147 billion in digital advertising revenue last year, respectively. By making companies liable for revenue earned that is not fairly attributable to their activity in Maryland, the law “regulates, punishes, and burdens” the companies’ business outside of Maryland, according to the complaint.

Last year, Maryland Attorney General Brian Frosh determined that “there is some risk” of a court overturning the law but that he believed the bill is “not clearly unconstitutional.”

Brian Fung contributed to this report