Immigrant advocates had long pushed Los Angeles to legalize street vending, arguing that sidewalk sellers who hawk ice cream, hot dogs wrapped in bacon, or other food and goods should not face criminal charges that could put them at risk of being deported.

But the idea languished at City Hall as lawmakers sparred over where and how sidewalk vending should be allowed. Activists grew frustrated as the years passed with hearing after hearing — yet no clear plan for legalizing and regulating their trade.

Then Donald Trump was elected president, and local officials decided to hustle.

Fearing a coming crackdown on immigrants, Los Angeles City Council members Joe Buscaino and Curren Price vowed to stop punishing vending as a crime and begin setting up a regulated system. The council pushed forward with their plan Tuesday, voting to draft a law that would decriminalize sidewalk vending.

As it stands, selling food or goods on the sidewalk can lead to misdemeanor charges in Los Angeles. City attorneys will now draw up new rules that would strip those criminal penalties and authorize the city to eventually issue vending permits, a first step toward legalization.

Councilman Jose Huizar told reporters it was “a sign to this Trump administration that we will not abide by his fear, his vilification, his scapegoating of immigrants.”

Instead, Los Angeles is saying, “You do not have to work in the shadows,” Huizar said.

City staffers say it could take months, however, for Los Angeles to work out all of the details and begin handing out permits to vendors. In the meantime, vendors who ply their trade on city sidewalks could still be cited and fined for violating the municipal code, but they would not face criminal convictions.

Lawyers are also supposed to report back on whether the city can offer amnesty to vendors already facing criminal charges. Though lesser citations are much more common, city prosecutors filed misdemeanor charges for sidewalk vending in more than two dozen cases between October 2015 and October 2016, according to the city attorney’s office.

Such charges could jeopardize immigrants in the country illegally. Last week, Trump signed an order that emphasized deporting not only people convicted of crimes but also people who were charged with crimes not yet adjudicated, and even those who have not been charged but are believed to have committed “acts that constitute a chargeable criminal offense.”

Those “disturbing developments” helped spur the city to take action, said Mike Dennis, who sits on the steering committee of the L.A. Street Vendor Campaign. “It took something horrible at the national level for them to see the urgency that we’ve been seeing for a long time.”

Business groups, including many that had raised concerns about vending, also said they supported decriminalization at the Tuesday hearing. The sole lawmaker to vote against decriminalizing sidewalk vending was Councilman Mitch Englander, who said that “it puts the cart before the horse” to roll back criminal charges before new regulations are in place.

Under the proposed system that the council backed Tuesday, Los Angeles would hand out a limited number of permits, allowing up to two stationary vendors to set up shop on each face of a block in commercial and industrial zones, and an as-yet-undetermined number of mobile vendors in residential areas.

But the city still has to work out many crucial parts of the proposal, including how much permits will cost, how many staffers will be needed to enforce the rules and what penalties will be imposed for violating them. Los Angeles also plans to allow some neighborhoods to impose stricter rules on sidewalk vending, but that process still needs to be hammered out.

Lawmakers still must decide those details — a potentially lengthy process — before permits will start being issued.

“There’s still work to be done,” said Councilman Gil Cedillo, who has long opposed misdemeanor charges for vending. “But this is a huge step forward.”

Sidewalk vendors and their advocates have argued that some of the proposed rules are too restrictive. The L.A. Street Vendor Campaign contends that the city should not allow neighborhoods to totally prohibit sidewalk vending, nor require vendors to get permission from neighboring shops to do business outside. Merced Sanchez, a vendor who works in downtown L.A.’s piñata district, pleaded with the council to loosen its proposed restrictions on the number of vendors allowed on each block.

If Los Angeles doesn’t permit more vendors, Sanchez told lawmakers in Spanish, most of them will be out of work.

The Coalition to Save Small Business, which has raised concerns about how sidewalk vending can affect brick-and-mortar businesses, has insisted that communities should be able to choose “more, less or no sidewalk vending” if they desire. Although the coalition backs many of the proposed restrictions on when and how vendors can operate, many businesses remain concerned about how the city will ultimately enforce them. Neighborhood groups have also voiced worries about blocked sidewalks and trash.

“We totally understand the reason why they’re pushing this forward with such speed, but we don’t want the details to get lost in the shuffle,” said Joseph Mariani, associate executive director of the Hollywood Property Owners Alliance. “There’s still a lot of questions we have on enforcement. Who’s going to do it? Who’s going to pay for it?”

Eliminating criminal charges for sidewalk vending is one of a string of proposals that Los Angeles lawmakers have backed to counter the actions of the Trump administration, including opposing the proposed Environmental Protection Agency chief and approving the hiring of an immigrant advocate at City Hall.

If Los Angeles wants to stand up for immigrants, “we can’t simply talk about opposing Trump’s policies or nominees,” Buscaino said Tuesday. “We need to take serious actions like this one.”

CAPTION

Democrat Doug Jones won Alabama’s U.S. Senate seat Tuesday. A cooking fire at a homeless encampment caused the Skirball fire, officials said. San Francisco Mayor Ed Lee, 65, died Tuesday. House Democrats called for an investigation into allegations of sexual misconduct by President Trump.

Democrat Doug Jones won Alabama’s U.S. Senate seat Tuesday. A cooking fire at a homeless encampment caused the Skirball fire, officials said. San Francisco Mayor Ed Lee, 65, died Tuesday. House Democrats called for an investigation into allegations of sexual misconduct by President Trump.

CAPTION

Democrat Doug Jones won Alabama’s U.S. Senate seat Tuesday. A cooking fire at a homeless encampment caused the Skirball fire, officials said. San Francisco Mayor Ed Lee, 65, died Tuesday. House Democrats called for an investigation into allegations of sexual misconduct by President Trump.

Democrat Doug Jones won Alabama’s U.S. Senate seat Tuesday. A cooking fire at a homeless encampment caused the Skirball fire, officials said. San Francisco Mayor Ed Lee, 65, died Tuesday. House Democrats called for an investigation into allegations of sexual misconduct by President Trump.

CAPTION

Democrat Doug Jones, whose uphill bid for U.S. Senate gathered strength when Republican Roy Moore was hit with charges of sexual misconduct with teenage girls, won Alabama’s special election Tuesday.

Democrat Doug Jones, whose uphill bid for U.S. Senate gathered strength when Republican Roy Moore was hit with charges of sexual misconduct with teenage girls, won Alabama’s special election Tuesday.

CAPTION

New York City's bomb attack suspect was allegedly inspired by Islamic State's call for attacks. The Thomas fire has grown to at least 230,000 acres. "The Shape of Water" and "Big Little Lies" led the Golden Globe nominations anounced Monday. Mario Batali stepped away from "The Chew" and his day-to-day business operations.

New York City's bomb attack suspect was allegedly inspired by Islamic State's call for attacks. The Thomas fire has grown to at least 230,000 acres. "The Shape of Water" and "Big Little Lies" led the Golden Globe nominations anounced Monday. Mario Batali stepped away from "The Chew" and his day-to-day business operations.

CAPTION

Santa Barbara County is under siege from the Thomas fire. From the GOP's perspective, Alabama's Senate race will yield one of two unhappy results. The Weingart Center wants to reshape skid row's skyline. If lawmakers can agree on a tax bill, will you owe more or less?

Santa Barbara County is under siege from the Thomas fire. From the GOP's perspective, Alabama's Senate race will yield one of two unhappy results. The Weingart Center wants to reshape skid row's skyline. If lawmakers can agree on a tax bill, will you owe more or less?

CAPTION

An explosive device exploded near Times Square during the morning rush hour Monday, injuring four people and snarling Manhattan transit, authorities said. Mayor Bill de Blasio described it as a terrorist act.

An explosive device exploded near Times Square during the morning rush hour Monday, injuring four people and snarling Manhattan transit, authorities said. Mayor Bill de Blasio described it as a terrorist act.