The Los Angeles City Council on Wednesday gave final approval to an ordinance decriminalizing street vending and laying out a compromise proposal for regulating vending within the city.

The 13-0 vote caps a years-long struggle by street vendors for recognition; it was spurred by possibility of street vendors being deported by the Trump administration for minor infractions.

The vote removed street vending from the list of misdemeanor violations and transferred jurisdiction over code violations to the city’s Building and Safety Department and away from the courts. Both moves are designed to ensure that street vendors have no criminal records that could be used by immigration enforcement officials to deport them.

Last week, federal immigration officials detained an estimated 160 individuals in Los Angeles County who could not prove they were in the U.S. legally. Officials said they placed an emphasis on those with criminal records.

The decriminalization of street vending would take effect immediately upon Mayor Eric Garcetti’s signature, which is expected in the next few days.

“This decriminalization is a huge victory,” said Mike Dennis, director of community organizing with the East Los Angeles Community Corp., the nonprofit that has been pushing for legalizing street vending for five years.

The vote also won praise from a business coalition that has pushed for flexible regulation of street vending.

“We support the City Council’s vote today for an ordinance that decriminalizes sidewalk vending and look forward to working with it to develop fair and reasonable regulations that will govern sidewalk vending in Los Angeles,” the Coalition to Save Small Business said in a statement.

The Council also voted to approve in concept a series of proposals crafted by councilmen Joe Buscaino and Curren Price that lay the foundation for regulating street vending.

The proposed rules were a compromise from an initial move to give blanket legalization for street vending throughout the city. Instead, a majority of property and business owners, and in some cases residents, would be able to petition to have certain streets excluded from vending. Another provision requires street vendors to have majority support from businesses in the immediate area where they want to operate.

All of these proposals now go to city staff and the City Attorney’s Office for the crafting of a detailed ordinance to regulate street vending, which could come back to the council within 90 days.

The compromises were welcomed by business groups that opposed earlier legalization proposals.

“We stand ready to work with the City Council and staff on developing fair and reasonable regulations for sidewalk vending that recognize that one size won’t fit all in a city with 10,750 miles of sidewalks,” Jessica Lall, chief executive of the downtown Central City Association said in a statement. “We appreciate the Council’s decision to give neighborhoods and business districts a choice in whether to have more, less or no sidewalk vending. We also appreciate its decision to give property and business owners a voice in determining what type of vending takes place on the sidewalks adjacent to their businesses.”

The proposals also would require the city to set permit fees at a level that ensures full cost recovery for enforcement of the street vending ordinance.

Street vending proponents such as Dennis said this would discourage many potential street vendors with little or no access to capital from setting up shop, but business groups welcomed the higher permit fees. They said the fees would allow for stricter enforcement against operators who lack permits or otherwise violate the rules.

Public policy and energy reporter Howard Fine can be reached at hfine@labusinessjournal.com. Follow him on Twitter @howardafine.