Amazon.com Inc. AMZN 0.12% may soon have to collect sales taxes in California after Gov. Jerry Brown signed an online tax-collection bill.

California's legislation, which was signed by Mr. Brown on Wednesday, is the latest attempt by a state to force Internet retailers to collect taxes on online sales. At least nine other states have passed such laws, including Arkansas, Connecticut and Illinois this year.

A new law law is could ensnare Amazon by forcing it to collect taxes on purchases by California residents because it has several offices in the state. WSJ's Stu Woo has details on Amazon terminating its affiliate program in CA as a result.

The California bill is different from the other ones and is likely to be challenged in court on the grounds that it violates a federal law that says retailers don't have to collect sales taxes in states where they lack a significant physical presence.

Previous state laws have required online retailers to collect sales taxes if they have online affiliates within the state. An affiliate is a website—such as a blog—that refers visitors to Amazon or other retailers. Affiliates get a commission for referrals that result in sales.

California's law also includes the affiliate provision, but it has two other components. One lets the state collect taxes on a retailer that—either by itself or through a subsidiary—designs or develops products sold by the retailer. The other component of the law is what is known as a "long-arm statute" that would allow the state's Board of Equalization to determine which businesses must collect sales taxes in the state.

The law could ensnare Amazon, forcing it to collect taxes on purchases by California residents because it has several offices in the state. The offices operate under a subsidiary, wholly owned by Amazon, called A2Z Development Centers Inc. The unit includes an office in Cupertino that develops the Kindle electronic reader, which is Amazon's best-selling product of all time. A2Z also has a San Francisco office, where employees develop Amazon's online music store, as well as locations in Orange County and San Luis Obispo.

Amazon has responded to such laws in other states, which typically have targeted only Amazon's affiliate relationships, by cutting ties with affiliates in those states. The Seattle-based company said Wednesday that the California law won't change anything about its California business. "This legislation is counterproductive and will not cause our retail business to collect sales tax for the state," said Paul Misener, Amazon's global-policy vice president, in a statement.

An Amazon spokeswoman declined to comment on whether the company would challenge the law.

Amazon also told its California affiliates that it plans to cuts ties with them. Republican George Runner, a member of the state's tax-collection board, blasted the bill, saying in a statement that "thousands of affiliates across California were losing their jobs."

Two law professors who specialize in such tax issues, Richard Pomp of the University of Connecticut and John Swain of the University of Arizona, said Amazon could make a case against the bill in court. At issue is whether the state can force Amazon to collect taxes even though A2Z's parent company, Amazon.com, has no presence in California because its operations in the states are run by subsidiaries.

But both Mr. Pomp and Mr. Swain say the bill appears valid. "I would bet in favor of a court upholding, rather than against a court upholding," Mr. Pomp said. Said Mr. Swain: "It's an uphill case" for Amazon.

California Democratic Assemblywoman Nancy Skinner, who helped develop the bill, said the legislation was designed to eliminate a perceived business impediment for brick-and-mortar retailers in the state. State and local sales taxes can add up to 10% in some California cities. Small businesses and big-box retailers such as Wal-Mart Stores Inc. WMT 2.02% complained that tax-free sales on Amazon gave the company an unfair edge.

"It's wonderful that the governor agrees that our California businesses need a level playing field," Ms. Skinner said after Gov. Brown signed the bill.

California lawmakers also saw the law as a way to help close its 2011-12 budget gap, which initially stood at $28 billion. The online-tax legislation was expected to reap an estimated $200 million a year.

Both Democratic and Republican state legislators throughout the country have supported online sales-tax-collection laws as a way to help close the budget gaps that have plagued states throughout the economic downturn. The measures are appealing because they technically aren't tax increases. Every state that has a sales tax also has what is known as a "use tax" for purchases made from out-of-state retailers. Typically, individuals and businesses are supposed to report these purchases when they file income taxes, but few individuals actually do.

Write to Stu Woo at Stu.Woo@wsj.com