Oversized vehicles that line the streets of the northeast Mission will have to start parking elsewhere after the Board of Supervisors approved a law on Tuesday that prohibits them from parking overnight.

Over objections from homeless advocates that the law criminalizes the poor, the supervisors passed the ordinance 7-4. Supervisors John Avalos, Jane Kim, David Campos and Christina Olague cast the dissenting votes.

Starting March 1, any vehicle that is 22 feet in length and 7 feet tall will be banned from parking overnight on certain city streets from 2 to 6 a.m., or risk being fined or towed.

In the Mission, the San Francisco Municipal Transportation Agency (SFMTA) intends to install signs prohibiting oversized vehicles from parking on 16th and 17th streets between Harrison Street and Potrero Avenue.

Over the past two years, the northeast Mission — where the only previous parking restriction was to make way for weekly street cleaning — has become a magnet for oversized vehicles. The police department has tried to enforce a current law that bans parking in the same spot for more than three days, but the problem persisted.

“It’s a cat and mouse game right now,” said Bevan Dufty, the city’s director of Housing Opportunity, Partnership and Engagement (HOPE). “It’s very hard for an individual to let go of the only housing they have.”

A survey by the SFMTA found 461 oversized vehicles parked on city streets in 2011 – most of them in the Sunset, Potrero Hill and Bayview districts. The SFMTA also collected registration data on 208 cars, of which 64 percent were registered to San Francisco addresses.

“Forgive me if I come across as a little incompassionate about it,” said Supervisor Malia Cohen, whose district includes Bayview Hunters Point. “I am tired of my neighborhood being the dump.”

Residents citywide have complained to supervisors about the trash dumping and graffiti they associate with the oversized vehicles.

The San Francisco Coalition on Homelessness and other organizations have spoken against the law, arguing that people live in their cars not by choice but rather a last resort.

Some supervisors, including Campos and Olague, asked the board to assess the needs of those living in their vehicles. Their amendments failed to pass, 4-7.

The program would start next year, to give the city’s HOPE program an opportunity to reach out to vehicle owners and attempt to get them into permanent housing.