The Boston City council unanimously passed an ordinance sponsored by Councillor Josh Zakim that bans the city from using state funds to support travel to North Carolina Thursday. 

The move comes after the state passed House Bill 2, banning cities from allowing transgendered individuals from using public bathrooms that correspond with their gender identity. That law was passed after city councillors in Charlotte, the state’s largest city, passed a local ordinance putting protections in place to allow transgendered individuals to do just that.  

RELATED: Caitlyn Jenner, other celebs join push to pass Massachusetts' transgender rights bill

The Boston ordinance -- which says the North Carolina law “officially sanction[s] discrimination against the transgender community and observes it “prevents North Carolina’s cities and towns from adopting stronger local anti-discrimination laws” -- will now prevent city money from financially supporting any travel to North Carolina. 

There are a few exceptions, including travel necessary to enforce city laws, meet a contractual obligation or “protect the health and safety” of Boston residents. 

“In Boston we believe that all individuals should be treated equally,” Boston Mayor Marty Walsh wrote in a statement provided to the Boston Globe. “I applaud Councilor Zakim for standing up against discrimination.”

RELATED: Eli Apple asked if he is gay by Falcons coach during NFL interview

Walsh told the paper that he plans to sign the bill into law. 

“I think it’s incredibly rare throughout the history of this country -- certainly in recent history -- for a state to call a special state of legislature to overturn an anti-discrimination law passed to protect people,” he said. “It’s so mean-spirited and discriminatory, I felt we needed to speak on it.” 

The ordinance means Boston will join four other cities and the State of New York, which both enacted similar provisions. 

A similar bill passed the Georgia state legislature, but Gov. Nathan Deal (R) said he plans to veto it.