A PLAN PUT forward by state education commissioner Jeff Riley as a compromise aimed at healing a rift over charter schools in New Bedford is instead drawing the wrath of the state’s largest teacher union, which has filed a lawsuit to block a deal it calls an “extortionate proposal” and “strong-armed attempt” to undermine the will of local families and educators.

In January, Riley announced a novel plan in response to an application from a New Bedford charter school to add more than 1,100 seats and open two new campuses in the city. Riley said he would recommend instead that the state approve 450 new seats under a plan in which a new Alma del Mar K-8 charter school would become the neighborhood school for students in the northwest corner of New Bedford where the new school planned to locate. The city also agreed to hand over at no cost a shuttered elementary school building to new charter school.

It would mark the first time in Massachusetts that a charter school’s enrollment has been integrated with a district system.

The New Bedford teachers union opposed the deal from the start, and its parent union, the Massachusetts Teachers Association, has joined with 10 New Bedford residents in filing suit to block the plan.

The suit, filed late Friday in Bristol Superior Court, charges that the plan would violate the state’s anti-aid amendment forbidding public support for private schools by giving Alma del Mar the former Kempton elementary school building and by ensuring the charter school a stream of students through the district enrollment system.

The suit also charges that the no-bid transfer of the building would violate procurement law as well as state law requiring that any transfer of school property come with a declaration by a municipality that the land “is no longer needed for an educational purpose,” something the plaintiffs say is clearly contravened by plans for a new school on the site.

New Bedford Mayor Jon Mitchell, in a statement on Monday, said the lawsuit “lacks merit, and is obviously timed to coincide with the Legislature’s consideration of the neighborhood charter school agreement.”

Following approval of the compromise plan by the New Bedford city council and school committee, a home rule petition was filed earlier this month on Beacon Hill that would give Alma del Mar permission to deviate from state law and implement a neighborhood-based enrollment school plan. The state’s charter school law otherwise requires charter schools to admit students citywide, with a lottery held if a school is oversubscribed.

When the state education board signed off on the proposal in January, it also approved a backup plan that would allow Alma del Mar to open a larger, conventional independent charter school with 594 seats if the compromise worked out with the city did not receive final approval. Mitchell said the fallback plan would cost the city an additional $4 million in education funding.

The compromise plan, “which would save New Bedford millions of dollars, was approved by the School Committee and the City Council, after having been reviewed thoroughly by attorneys for the city, school committee and state,” Mitchell said in his statement on Monday.

Mitchell, who strongly opposed the original Alma del Mar expansion proposal, hailed the compromise plan in January as good solution to a difficult problem. “This is a fairer way to do charter schools — fairer to cities, fairer to taxpayers, and fairer to students in district schools,” he said at the time.

The state Department of Elementary and Secondary Education, which was named a defendant in the suit along with the city, its school department, and Alma del Mar, said it had no comment on the suit, but reiterated support for the agreement Riley worked out. “We believe this compromise is in the best interest of New Bedford students and families, and we were pleased to see that the mayor, School Committee and City Council agree,” the department said in a statement.

Will Gardner, the founder and executive director of Alma del Mar Charter School, also declined to comment in the suit.

“We certainly worked hard alongside our counterparts in the district and with the state to move this compromise forward,” he said. “We  of course would like to see it move forward, and we’re also prepared to open a lottery-based Commonwealth charter as well,” he said, referring to the backup plan for a larger, conventional charter school that the state also approved.

The home rule petition, which is the final approval needed for the compromise plan, was filed in the Legislature on May 2 by Rep. Christopher Markey, a Dartmouth Democrat whose district includes part of New Bedford. Markey said on Monday that he’s had conversations with Speaker Robert DeLeo about the need to take up the measure soon to allow New Bedford officials to put plans in place for the school year beginning in September.

The Mass. Teachers Association sent a letter last week to all lawmakers urging them to oppose the home rule bill, which it called a “strong-armed attempt by the Baker administration” to undermine local opposition to a new charter school in New Bedford.

Along with citing the legal arguments put forward in the lawsuit, the letter from union president Merrie Najimy and vice president Max Page said the home rule petition would “advance a dangerous charter school model” that, if passed, “will undoubtedly be used across the state to the detriment of school districts.”

Charter schools, which are publicly funded but operate independently of school districts, with teachers that are usually not unionized, have been a target of union opposition for decades.

While the union made clear from the outset that it viewed the New Bedford proposal as a dangerous precedent that could set the stage for similar compromises that end up weaving charter schools into the fabric of district enrollment plans, leaders in New Bedford say they’re focused on the local impact of the choices in front of them.

“I think when you look at the whole picture, it’s a solution to what could be a devastating financial crisis in New Bedford,” Markey said, referring to the greater impact the district would feel from the larger charter plan that will otherwise go into effect.