He ate a sandwich. She sold churros. After both were detained, people are protesting

Two videos showing police detaining people for food-related public transit code violations in two different cities have sparked fierce debate after gaining viral attention this weekend.

A 15-minute video recorded in the San Francisco Bay Area showed a black man being handcuffed after eating a breakfast sandwich on a train platform, and a video recorded in New York showed police seizing a Hispanic woman's vending cart and her merchandise.

Advocates in both the Bay Area and New York argue that public funds that should be used to improve the quality of public transit systems are being misplaced in enforcing and criminalizing low-level code violations, disproportionately targeting poor people and people of color.

The detainments have since spurred fierce debate — both among the general public and between city officials — over the policing strategies deployed in public transit systems, how much resources should be invested in policing on subways, and who is being targeted by officers.

Black BART passenger to police: 'You singled me out'

In the San Francisco Bay Area, Steve Foster, a black man, was detained last week after eating a breakfast sandwich on the platform at a Bay Area Rapid Transit (BART) station in Walnut Creek, California, 25 miles northeast of San Francisco.

BART General Manager Bob Powers apologized to Foster and "the public who have had an emotional reaction to the video" Monday, but explained that Foster did not provide identification and "cursed at and made homophobic slurs at the officer."

"The officer was doing his job but context is key," he wrote in the statement.

California penal code prohibits "eating or drinking" in a public transportation system in areas "where those activities are prohibited." The platform where the incident took place is deemed a "paid area," and is included in this code.

The video documents an extended encounter between an officer and Foster, including Foster's repeated accusation that he was being racially profiled.

"You singled me out, out of all these people," Foster said, in the video shared on Facebook Friday recorded by Foster's girlfriend.

"You're eating," the officer said, to which Foster replied, "Yeah, so what?"

Foster continued to resist, explaining that he felt "harassed" by the officer, until three officers escorted Foster out of the station. He was cited for eating on the train platform.

Around 30 people, per KGO-TV in San Francisco, attended an "eat-in" held at a San Francisco BART station Sunday, eating their own sandwiches in solidarity with Foster days after the video showing him being detained went viral.

Alyssa Williams, a Bay Area resident planning a follow-up protest, told USA TODAY that in the six years she's lived in the Bay Area, "I have never seen or been issued so much as a verbal warning for eating food on BART."

"I eat on public transit almost every day," she said, suggesting "the officer's clear racial profiling and insensitivity" in detaining him.

Janice Li, a member of BART's Board of Directors, showed up to the eat-in. She told USA TODAY Tuesday that she wanted to show using police to enforce policies that prohibit eating or drinking "is not a good use of our resources." She noted that there was no BART police presence during the eat-in.

Li emphasized that instead of enforcing this policy, resources should be put into improving the quality of BART trains and service.

A follow-up protest co-organized by Williams, called "Eat a McMuffin on BART: They Can't Stop Us All" is scheduled to take place this weekend at the same station Foster was detained.

NY official: Handcuffing churro vendor 'doesn't make anyone safer'

Across the country in New York, a Latina woman who sold churros at the Broadway Junction stop in Manhattan was detained by NYPD officers after receiving 10 summonses in the past six months for "unlicensed vending," per a statement from NYPD.

In the video, the woman, who appeared to be in tears, was surrounded by multiple officers who put her in handcuffs and said she could either give up her cart or face arrest.

"Can she just go outside and keep her stuff?" asked Twitter user Sofia B. Newman, who posted the video on Twitter.

The officers took away her cart as evidence, in accordance with procedure, NYPD spokeswoman Det. Sophia Mason told USA TODAY. "She refused to cooperate and was briefly handcuffed; officers escorted her into the command where she was uncuffed," said Mason.

NYPD did not release the woman's name to USA TODAY.

The woman has been released and given a civil summons to appear in court. In a protest Monday, she broke down in tears, per NY1, telling protestors that police officers confiscated her merchandise.

The incident reignited concern over New York Gov. Andrew Cuomo's controversial plan to deploy 500 new officers and place 500 more current officers to patrol city subways in an effort to cut fare evasion and improve the "quality of life" on subways.

Activists argue this incident, along with others where turnstile hoppers were attacked and pointed at with guns on the subway, show how low-income people and people of color are being disproportionately targeted by these systems.

"Our overarching concern is that money is being redirected from basic service on buses and subways that we depend on and instead put toward overpolicing and criminalizing minor behaviors on the subway," said Danny Pearlstein, the communications and policy director for the nonprofit Riders Alliance.

City officials have since been split on the issue, with some concerned that these arrests do not make riders' trips safer or less congested.

Mayor Bill De Blasio defended the NYPD's decision to detain the churro vendor, saying that she had been warned multiple times to remove her cart. "It's against the law and it’s creating congestion and she shouldn’t have been there," he said Monday in a press conference.

Scott Stringer, the city comptroller, wrote on Twitter Saturday that the detainment “doesn’t make anyone safer” and “raises serious questions” about the increase in police presence in the city’s subways.

New York City councilman Stephen Levin voiced his concern to stop "this horrible policy."

"Is this seriously affecting anyone's 'quality of life'?" he tweeted Saturday.

Contributing: The Associated Press. Follow Joshua Bote on Twitter: @joshua_bote

This article originally appeared on USA TODAY: He ate on BART. She sold churros in NYC. Both were detained