Mecklenburg's immigrant-detention program could be going away. Here's how it works.

Democrat Garry McFadden's primary win Tuesday is expected to make him Mecklenburg County's next sheriff, and may end the county's participation in a controversial program that targets illegal immigrants among criminal suspects.

McFadden and fellow candidate Antoine Ensley campaigned against the 287(g) program, while current Sheriff Irwin Carmichael supported it.

Mecklenburg has taken part in the program since 2006 and processed more than 15,000 inmates for deportation. Most of the 288 people deported last year were from Mexico and Latin America.

Here's more about the program and how it works:

Congress added the section to federal immigration law in 1996. It allows U.S. Immigration and Customs Enforcement to sign agreements that let state and local law enforcement agencies take on some immigration law enforcement duties under ICE supervision.

ICE says the program is intended to focus on criminal aliens, "particularly those who pose the greatest risk to public safety."

The Mecklenburg County Sheriff's Office is one of 76 law enforcement agencies in 20 states that have signed agreements with ICE, including six in North Carolina. Sheriff's offices in Mecklenburg, Cabarrus, Gaston, Henderson, Nash and Wake counties all have jail enforcement agreements.

The current Mecklenburg-ICE agreement lets deputized officers:

Interrogate any person arrested for breaking federal, state or local laws and "who the officer believes to be an alien" about his or her right to remain in the U.S.

Serve arrest warrants for immigration violations.

Administer oaths and take fingerprints, photographs and affidavits for ICE review.

Prepare documents including a Notice to Appear, a charging document that signals the start of removal proceedings, for ICE signatures.

Issue immigration detainers that allow the person to be detained for up to 48 hours beyond the time they would otherwise be released.

Transport arrested aliens to ICE-approved detention facilities.

Immigrant supporters cheered McFadden's primary win. He faces no Democratic challenger in November.

"We are optimistic that brighter days are ahead for the residents of Mecklenburg County and its diverse immigrant community," Hector Vaca, Charlotte director of the advocacy group Action NC, said in a statement. "The eventual elimination of the 287(g) program, along with the other reforms McFadden supports, are a very positive step for everyone in the Charlotte region."

The American Civil Liberties Union said it spent $175,000 in the county during the sheriff's race, focusing on civil rights issues including those affecting immigrants.

“These results show that voters care passionately about crucial civil rights issues, from police accountability to the rights of immigrants, and they will vote when they see that their rights depend on it,” Karen Anderson, the ACLU's state director, said in a statement. “We provided the voting public with essential information on civil liberties issues, and the voters demanded justice and accountability from the sheriff candidates. We look forward to working with our members and community partners to hold Mecklenburg County’s next sheriff accountable for ensuring that the rights of all communities are protected.”

Bruce Henderson: 704-358-5051; @bhender