Trucking industry officials say a California bill aimed at the “gig-economy” business models of ride-hailing companies would upend operations in the state and potentially raise shipping costs by pressing fleets to count as employees the thousands of drivers that now move freight as independent contractors.

The state’s Senate and Assembly this week passed legislation that seeks to force companies to reclassify certain contract workers as employees. The measure is aimed at putting into law a state court ruling last year involving package-delivery workers.

The bill is aimed at big tech companies like Uber Technologies Inc. and Lyft Inc., but experts say it would go beyond those businesses to affect industries like trucking that use contract workers.

Newsletter Sign-up The Logistics Report Top news and in-depth analysis on the world of logistics, from supply chain to transport and technology. PREVIEW

Although many U.S. trucking companies hire their own company drivers, most also rely heavily on independent drivers that own or lease their equipment to supplement their operations. The independent owner-operator model is especially prevalent in port trucking operations, where companies say drivers have the ability to make more money than they might as employees.

The California measure “effectively prohibits an owner-operator from working directly for a motor carrier,” said Joe Rajkovacz, director of governmental affairs and communications for the Western States Trucking Association.

The group filed a federal lawsuit challenging California’s application of the standard from the 2018 court case to the trucking industry. The group’s suit was dismissed earlier this year. The law “will really cause people to look at how they structure their business,” Mr. Rajkovacz said.

Under the employment legislation, certain industries including most trucking operations would have to pass a three-part test to classify a worker as a contractor instead of an employee, including that the work a contractor performs isn’t something the company does itself in the normal course of its business.

That standard is tougher than previous requirements and is one that transportation experts say would be difficult to meet for the many motor carriers that routinely contract freight out to independent truckers.

Raising the bar for using contract drivers “takes some of the nimble reaction to the freight market away from the trucking industry, [especially] in California where you have large port operations with a lot of freight coming in, and large volumes around Christmas,” said Greg Feary, president and managing partner of transportation law firm Scopelitis, Garvin, Light, Hanson & Feary, PC.

“You would like to think the freight will get moved,” Mr. Feary said, “but will the prices increase for the shippers and then the consumer? Will freight sit for a while? Will delivery times extend?”

Gov. Gavin Newsom has said he would sign the measure, which is backed by labor groups including the Teamsters union. The Teamsters have waged a yearslong campaign to organize California port truck drivers who they say are unfairly misclassified as independent contractors and so deprived of workers compensation, meal and rest breaks and other protections.

“Misclassification is an attempt to weaken the power of workers, including the thousands of truck drivers in California who deserve a living wage and full rights as employees,” Teamsters General President Jim Hoffa said in a statement after the state Senate passed the measure.

NFI Industries, a New Jersey-based logistics provider that has California port-trucking operations targeted by the Teamsters and faces lawsuits filed by the City of Los Angeles over alleged employee misclassification, said the bill would force independent drivers to be employees against their will. The company said the legislation unfairly exempts some groups but not others.

The California Trucking Association, which sought unsuccessfully to carve out exemptions in the bill for trucking, said the measure “would deny a significant segment of the trucking industry” that have invested tens of thousands of dollars in equipment “the ability to continue operating as independent owner-operators.”

The group estimates there are roughly 70,000 owner-operators in the state.

From the Archives For an increasing number of Americans, a patchwork of gig work is the norm, while others have become so-called independent workers because they take second jobs through digital platforms like Uber or Etsy to make ends meet. But nearly all face the challenges of inconsistent income and access to benefits. (Originally published March 21, 2018)

Write to Jennifer Smith at jennifer.smith@wsj.com