SAN FRANCISCO (AP) — San Francisco officials voted Tuesday to require brick-and-mortar retailers to take cash as payment, joining Philadelphia and New Jersey in banning a growing paperless practice that critics say discriminates against low-income people who may not have access to credit cards.

The vote by the Board of Supervisors was unanimous.

Supervisor Vallie Brown, who introduced the legislation, said it "will go far in ensuring all San Franciscans have equitable access to the city's economy."

Brown said she thought it unfair that people couldn’t buy a sandwich just because they had only cash. She said young people, victims of ID theft, immigrants, and homeless people are among those who don’t have bank accounts or credit cards.

In many ways, the legislation was an easy call for San Francisco officials, who strive to make life more equitable in a city with an enormous wealth gap.

High-paid tech workers who flocked to San Francisco to work for Facebook, Google, Uber, and Airbnb may like the ease of paying by credit card, debit card or smartphone.

But many low-income people, including more than 4,000 who sleep on San Francisco's streets every night, likely don't have money to sustain bank accounts.

According to the Federal Deposit Insurance Corp., 17 percent of African American households and 15 percent of Latino households had no bank account.

Some people also prefer to use cash because they don't want to leave a digital trail of where they have been and what they have bought.

San Francisco's legislation requires brick-and-mortar businesses to accept cash for goods and some services. Temporary pop-up stores and internet-only businesses such as ride-hailing companies would be exempt, as would food trucks, which say they lack the resources to handle cash.

Philadelphia and New Jersey passed similar laws this year. Legislation requiring merchants to accept cash also has been introduced in New York City.

The efforts come after the rollout last year of cashless Amazon Go stores, which require customers to scan an app to enter. Whatever items customers take are automatically tallied in a virtual cart and charged to a credit card.

The retail giant bowed to pressure last month and agreed to accept cash at more than 30 cashless stores.

Amazon opened its first cash-accepting store Tuesday in a high-end New York City shopping mall frequented by office workers. Anyone who wants to pay with cash will be swiped through the turnstile entrance by employees. After shoppers grab what they want, an employee will scan the items with a mobile device, take the cash, and give customers their change.

Amazon didn't say when its 11 other Go stores will start accepting cash.

Plenty of cheap dim sum spots, taquerias, and dive bars take only cash in San Francisco, but some retailers argue that not taking cash is safer and more efficient.

Cashless restaurants are clustered in San Francisco's Financial District and South of Market neighborhoods, where white-collar employees devour upscale salads and protein bowls.

Those now refusing paper money include Bluestone Lane, a New York-based coffee chain, and the Organic Coup, which sells organic fast-food chicken. At Freshroll Vietnamese Rolls & Bowls, which has several lunch spots downtown, signs remind customers of its no-cash policy.

Andy Stone, vice president of brand marketing at Bluestone Lane, said the company "will always comply with the laws of jurisdictions where we operate."

The other companies did not respond to requests for comment from the Associated Press.

Some businesses appear to be getting on board as the backlash grows.

Salad chain Sweetgreen announced last month that it will accept cash at all its restaurants by year's end, saying going cashless "had the unintended consequence of excluding those who prefer to pay or can only pay with cash."

The San Francisco Chamber of Commerce did not take a position on the proposal.