The Phoenix City Council voted against a petition Wednesday for the city to adopt sanctuary status for immigrants following a heated debate that lasted hours.

TEXAS ANTI-SANCTUARY CITY LAW COULD COST BORDER COUNTY MILLIONS

A crowd of people chanted "shame on you" in the chambers after the council voted 7-to-2 against the petition.

Arizona's landmark 2010 immigration law-- known as SB1070-- bars any city in the state from becoming a sanctuary. Most of the law, however, was gutted by the courts.

ILLEGAL IMMIGRANT TAKES REFUGE IN DENVER CHURCH TO AVOID DEPORTATION

Officials said the remaining sections prevent local government agencies from restricting the enforcement of federal immigration law.

Phoenix’s Mayor Greg Stanton, a Democrat, made the motion to deny the request but said he stands with immigrants and against President Trump’s policies to deport more people. The council also voted to ask the city attorney to present legal options against SB1070, although the U.S. Supreme Court has already ruled on it.

Proponents of sanctuary status said the council should stop separating families like that of Guadalupe Garcia de Rayos, the mother of two U.S.-citizen children who was deported last week following a routine check-in with the U.S. Immigration and Customs Enforcement agency.

Policies for sanctuary cities vary, but essentially bar local police from cooperating with federal immigration authorities.

A recent report from the Pew Research Center says the Phoenix metro area is home to about 250,000 immigrants in the country illegally. The report is based on data from 2014.

The Associated Press contributed to this report.