BOSTON — The fishing ports of Gloucester and New Bedford will make their case in federal court that key parts of new fishing regulations are illegal and should be struck down.

The lawsuit against federal regulators was filed in May, after rules went into effect that saw most of the fleet separate into groups, or “sectors,” that divide an alloted catch.

The idea behind the new system is to give fishermen more autonomy and flexibility, but many small-boat fishermen say their allotments are so low they can’t make a living.

The suit argues that certain groups were favored when regulators devised the formula to determine catch allotments. They also say the overly strict measures are illegal in a fishery that is “substantially rebuilt.”

The government has denied the allegations.