The process that yielded Boston’s latest voting map was both a strategy to protect incumbents and a “racial diluting” of the city’s long-held majority-minority seat in Mattapan, At-Large City Councilor Michael Flaherty testified in federal court Tuesday.

His comments came during the opening hearing of the case challenging the legality of the voting map approved by the council and Boston Mayor Michelle Wu last November.

Flaherty, who is in his 20th year on the Boston City Council, argued fellow councilors who ultimately approved the map were less experienced with the redistricting process and wrongly focused on racial demographics.

“We’re here today because people disregarded the advice of professional experts,” Flaherty proclaimed, pointing to a memo drafted by Jeffrey Wice, a redistricting expert and adjunct professor at New York Law School. The memo listed key principles for redistricting, including “population equality, minority voting rights, compactness, contiguity and preservation of neighborhoods.”

“[The council’s] primary objective,” Flaherty argued, was “population balancing” — which is basically making sure each district contained an equal number of voters. That goal, he testified, was largely achieved during a September working session. In that session, all councilors except one, Ricardo Arroyo, toyed with voting district boundaries according to newly drawn precincts, the units that compose the city’s nine voting districts.

Rather than adhering to the equal population charge, Flaherty said his council colleagues eventually disregarded the changes of that working session and erroneously considered racial demographics as they sought to rearrange the city’s nearly 300 precincts according to the latest U.S. Census figures.

“We didn’t need to do anything else,” he said repeatedly.

Toward the end of his three-hour testimony, Flaherty said he feels the council’s “rushed” adoption of the map created another vulnerability: it opens up the council to accusations of incumbent protection.

The late adoption, he said, would make it very difficult for an aspiring City Council candidate to determine what district they reside in and take the necessary steps to challenge a sitting councilor.

Those seeking to run in the upcoming election can begin declaring their intent to run as soon as April 19, a fact that dawned on Judge Patti B. Saris as Flaherty wrapped up.

"I need to have this done by the end of April?" she asked the attorneys, noting a prior impression of no urgent deadline for the case.

Flaherty’s testimony was punctuated by stints of searching for exhibits and murmurs and snickering from onlookers in the audience, mostly from local political advocacy groups who support Boston’s new map. At one point, Judge Saris warned the onlookers to be quiet, or be ejected from the courtroom.

Lawyers for the city did not produce a witness, but in opening statements said that the case amounted to a mere political dispute.

“This case is ultimately about choices,” said attorney Jennifer Grace Miller. The final map, she said, made “modest” changes to the city's last map, was approved through the proper municipal channels and left a contingent of residents unsatisfied.

An evolving case

Plaintiffs challenging the city map are scheduled to present more witnesses, including veteran Congressman Stephen Lynch, whose district contains a portion of South Boston.

The case is an outgrowth of a state court case brought by a coalition of South Boston residents and community groups who tried to stop the council from approving the map last year. The case was later amended to include the latest arguments, then eventually moved to federal court and revised to include new plaintiffs.

Boston saw an explosion of growth in its newly built Seaport neighborhood over the last decade. The area sits within the city’s second voting district, requiring the boundaries to shift and shed population. At the same time, the city’s third district, anchored in Dorchester, needed to pick up voters.

Councilor Arroyo, who was stripped of chairmanship of the city’s redistricting committee amid last year’s messy Democratic primary for Suffolk County district attorney, attended Tuesday’s hearing and said his colleague’s testimony illustrated “just how frivolous the lawsuit actually is.”

“I think it’s very telling that not a single expert is on the witness list for the plaintiffs … and I think it’s pretty clear at this point that there’s no real law this lawsuit is standing on," he said.

The case is scheduled to resume Wednesday.