State politicians struggling with yawning budget gaps due to the pandemic have made no secret of their interest in preserving a greater chunk of the tech industry’s wealth.

Now Maryland lawmakers are taking a new step: the country’s first tax on digital ad revenue sold by companies like Facebook, Google, and Amazon.

The Senate voted Friday to overturn the governor’s veto on the measure, following in the footsteps of the state’s House of Representatives, which gave its approval on Thursday. The tax will generate up to $ 250 million in the first year after it goes into effect, with the money going to schools.

The approval signals the arrival of policies developed by European countries in the United States, and it is likely to spark a heated legal battle over how far communities can go to tax the tech companies.

Other states are making similar efforts. For example, lawmakers in Connecticut and Indiana have already introduced bills to tax the social media giants. Several other states, like West Virginia and New York, didn’t enact new taxes on the tech giants in the past year, but their proponents could renew their foray into Maryland’s success.

The moves are part of an escalating debate about the economic power of tech giants as companies have grown, become gatekeepers to communication and culture, and started collecting tons of data from their users. In the United States, law enforcement agencies launched multiple antitrust proceedings against Google and Facebook over the past year. Members of Congress have proposed laws to review their market power, encourage them to moderate the language more carefully, and protect the privacy of their users.

Maryland’s tax also reflects the collision of two economic trends during the pandemic: The biggest tech companies hit milestones in their financial performance as social distancing continued to move work, play and commerce online. However, in cities and states, tax revenues declined as the need for social services increased.

“You’re really getting bruised,” said Ruth Mason, a professor in the University of Virginia law school. “And this is a great way to put a tax on pandemic winners.”

Lobbying groups for Silicon Valley companies like Google and Facebook have joined other opponents of the law – including Maryland Republicans, telecommunications companies, and local media – arguing that tax costs are passed on to small businesses that buy ads and their customers. Doug Mayer, a former adjutant to Governor Larry Hogan, who now leads a coalition supported by industry opponents of the tax, said at a news conference last week that advocates for the law “are using this bill to crack down on the state, faceless large corporations. “

“But they swing and miss and hit their own ingredients in their mouths,” he said.

Maryland tax, which applies to digital ad revenue from within the state, is based on the ad sales a business generates. A company that has worldwide sales of at least $ 100 million per year but no more than $ 1 billion per year should expect a 2.5 percent tax on its ads. Companies that make more than $ 15 billion a year pay a 10 percent tax. The worldwide turnover of Facebook and Google is well over 15 billion US dollars.

Bill Ferguson, a Baltimore Democrat who is President of the Senate, was a major driving force behind the bill. He said he was inspired by an op-ed paper by economist Paul Romer, in which he suggested taxing targeted ads to encourage companies to change their business models.

“This idea that an outsider can use and use someone else’s personal information and pay nothing to use it doesn’t work in the long run,” Ferguson said.

Maryland’s democratically controlled legislature passed the tax last March with a veto-proof majority. But Mr Hogan, a moderate Republican, vetoed the measure in May.

“Since our state is in the midst of a global pandemic and an economic collapse and is only just on the way to recovery, it would be incomprehensible to raise taxes and fees now,” Hogan explained his argument in a letter.

End of last year, industry groups helped set up a lobbying organization to prevent lawmakers from overriding Mr. Hogan’s veto.

For months, the Marylanders for Tax Fairness organization, backed by some of Silicon Valley’s leading lobby groups, has been warning Maryland lawmakers on cable news and local radio that a proposed digital advertising tax is a “bad idea” in a ” bad “be time.”

The coalition has highlighted the stories of small businesses that it says will ultimately pay the cost of the new tax when they buy ads online.

“A new $ 250 million tax during a pandemic,” the powerful narrator told an ad on a video of a bar in Annapolis. “Tell your lawmakers: Stop the digital advertising tax.”

While some states impose sales tax on some digital goods and services when they are purchased by customers, the Maryland tax is the first to be applied solely to revenue generated by a digital advertising company in the United States, experts say . The state lawmaker is expected to pass a second bill in the coming days clarifying that the tax does not apply to media companies and that the costs cannot be passed directly on to companies that buy ads, despite critics saying that the tax will still lead to higher tax rates on ads.

European politicians have turned to digital taxes in recent years as part of a major regulatory push against American tech giants. France has imposed a 3 percent tax on some digital revenues. Austria taxed income from digital advertising at 5 percent. The European efforts have been condemned by the Trump administration, which threatened to impose tariffs on French goods on the matter.

“I don’t think the issue is any different in Maryland than it is in California, India, France or Spain,” said Senator James Rosapepe, a Democrat who is the vice chair of the tax committee. “Since they are so profitable, they should pay taxes.”

Maryland’s tax is likely to be brought to justice.

Opponents can argue that the law taxes out-of-state activities that are against the Constitution because the largest tech companies are not based in Maryland. You can also argue that the law violates a federal law that says taxes on digital goods or services must also apply to equivalent physical products.

“It’s tax discrimination,” said Dave Grimaldi, executive vice president of public policy at IAB, an online advertising trading group. “Once it goes into effect, there will be all kinds of challenges.”

But supporters of the law said they believed they were on solid ground to tax the giants.

“We believe that even if the overwriting is done, the industry is likely to file a lawsuit,” Ferguson said. He said lawmakers asked the attorney general if they could defend the law.

“And they have,” he said. “You have signed out.”