A crowded field of candidates for Montgomery County executive took on the issues of racial equity and immigrant rights at a forum Sunday, mostly agreeing on the need to do more for underserved residents but splitting on the potential impacts of the Purple Line and on what the county’s top priorities should be.

Six Democrats and one Republican are vying to succeed outgoing County Executive Isiah Leggett (D). Before an audience of hundreds at Northwood High School in Silver Spring, they took turns answering questions on the county’s role in funding legal representation for immigrants facing deportation, improving the relationship between police and the community, and keeping development around the forthcoming light rail from bringing D.C.-style gentrification to the county.

On several points — increasing educational opportunities, maintaining diversity in government — the candidates largely aligned, with several pledging to make the county government more accessible to diverse populations.

But some also emphasized the importance of improving the business climate in the state’s most populous jurisdiction as a way to boost economic opportunities for immigrants and minorities.

“Montgomery County really is a tale of two counties,” said Roger Berliner (D), a three-term council member who represents Potomac and Bethesda and said he was confident the county would go forward with helping to provide legal representation for immigrants facing deportation.

“We have an east-west divide we must confront and address unflinchingly,” he said.

Council member George Leventhal (D-At Large), praised county police officers as “relatively progressive and enlightened” but said he would require them to collect data on traffic stops and interactions with the community to ensure that minorities aren’t disproportionately targeted.

Leventhal also said he would encourage nonprofits and schools to help educate families on managing money and improving credit as a path to homeownership.

Marc Elrich, also an at-large Democrat on the council, called for more training for police, particularly in de-escalation, and for recruiting more minorities to serve. He said the county’s decisions needed to be viewed through a “racial-equity lens.”

“You make reports and you look at everything you do, and say, ‘What’s the racial impact of it?’ ” he said. “ ‘Zoning — who’s going to live here after it’s built, and who’s not going to live here?’ ”

In response to a question about a historic African American burial ground in Bethesda that was paved over decades ago and has since been slated for redevelopment, Elrich said he wants the county to survey the site to find out whether all the remains have been removed.

State Del. C. William Frick (D-Montgomery) addressed deportation concerns among the county’s undocumented residents, noting that many are parents of U.S. citizens. He called immigrants “the core of our future entrepreneurs.”

“It’s awfully discouraging to me that we now seem to live in an era where so many of our federal leaders don’t think about taking away an American’s mother but wouldn’t dream of taking away an American’s gun,” he said.

David Blair, a Bethesda businessman and Democrat, called for more creativity in encouraging affordable housing and spoke of his own experience opening a small business in Rockville with his wife — a process he called “unbelievably difficult.”

“We’re not fostering small-business growth nearly at the rate we should be,” he said.

Rose Krasnow, deputy director of the county’s planning department and former Democratic Rockville mayor, said the Purple Line “will have wonderful benefits for people along its length. It will raise property values, but it will spur development,” she said.

Krasnow also said she wanted to attract more small businesses to the county, saying it was “important we address economic disparities.”

Robin Ficker, the only Republican seeking the office, said his experience as an attorney advocating for clients who have suffered brutality gave him a perspective on the discrimination minorities face.

He said the Purple Line was needed “so that minorities can move from one place to another,” and he said roads should be improved to ease traffic congestion.

He also promised supporters of the Bethesda cemetery that they would get a museum honoring the history of the site.

Fissures erupted on occasion. After Elrich expressed his concern about gentrification that could follow the path of the Purple Line, Leventhal spoke about the benefits the line would bring immigrant workers.

“We should stop frightening people about it, as Mr. Elrich has repeatedly done,” Leventhal said.

“I never said the word ‘destroy’ about the Purple Line,” Elrich responded, noting that his opposition to some of the plans resulted in changes that will preserve hundreds of affordable housing units.

Audience questions ranged in topic from the trash incinerator in the county to the effects of climate change to attracting more businesses in the eastern portion of the county. Brandy Brooks, a candidate for one of the four at-large council seats, asked about diversity, directing her question to Krasnow, the race’s only woman.

“The first question in this forum was about having diversity, but as we look at this panel, it is entirely white and has only one woman,” she said.

Krasnow said the lack of diversity was part of what led her to compete in the June 26 Democratic primary.

“I looked at the field of candidates in November, and I said, ‘In Montgomery County, Maryland, we get this type of lack of representation running for office?’ ” she said. “I can’t change the color of my skin, but at least I am a woman.”