BANGOR, Maine — A federal judge brokered an agreement Monday afternoon that will allow the Occupy Augusta group to continue its protest in Capitol Park without a permit after a lawsuit was filed in U.S. District Court.

U.S. District Judge Nancy Torresen got involved in the dispute between the protesters and Capitol Police after two of the nine people arrested Sunday outside the Blaine House sued the Maine commissioner of public safety.

The lawsuit, filed Monday morning, alleges that requiring protesters to obtain a permit to continue their vigil in Capitol Park violates their First Amendment right to expressive conduct.

Attorney Lynne Williams of Bar Harbor also filed a motion for a temporary restraining order to keep protesters from having to get a permit to remain in the park indefinitely. The Maine Attorney General’s Office, which will represent the commissioner, has until Thursday to file its reply to the motion.

A hearing on that order will be held 1 p.m. Monday in federal court in Bangor.

The named plaintiffs in the action are James Freeman of Verona Island and Diane Messer of Liberty. The defendant is Public Safety Commissioner John E. Morris.

Russell Gauvin, chief of the Capitol Police, which is under the supervision of the Department of Public Safety, on Friday told protesters they could no longer camp out overnight in the park across from the State House. He also said they would have to remove all but one tent and would have to obtain a permit to continue activities there, according to the complaint.

All but one large tent were removed from the park following Wednesday’s snowstorm, according to previously published reports.

In the so-called standstill agreement with Torresen, protesters have agreed not to move any tents back into the park or to have any open fires, propane heaters or other incendiary devices in the park, Brenda Kielty, spokeswoman for the Maine Attorney General’s Office, said in telephone interview late Monday afternoon. The police will not ask the group to apply for a permit until Torresen has issued a decision on the motion for a temporary restraining order.

In the complaint, Williams said that the rules governing use of Capitol Park across from the State House are unconstitutional because they fail to distinguish “between large groups engaging in First Amendment activities and small groups, or even a lone speaker” and they give too much discretion “to the administrative decision maker regarding whether to grant a permit and what the time frame for making that decision must be.”

Although the American Civil Liberties Union of Maine has not been asked to sign on to the lawsuit, the organization believes the activities of the Occupy groups are protected by the First Amendment, Zachary Heiden, staff attorney for the organization, said Monday.

“The First Amendment guarantees the right of people to demonstrate in favor of political change,” he said in an email after reading the court documents. “The ACLU of Maine will do everything it can to support that right.”

Although the state is not expected to reply to the complaint for several weeks, Assistant Attorney General Paul Stern on Monday filed two decisions concerning temporary restraining orders sought by Occupy groups out of federal courts in Florida and Minnesota. They support the position he will take at the hearing next week, according to Kielty.

Judges in those cases supported protesters’ First Amendment right to assemble in public places but supported local government’s ability to restrict some specific activities, such as using power for computers without paying for it and attaching signs to lampposts. In both cases, however, judges upheld local laws that banned setting up tents or other structures.

In his decision issued Wednesday, U.S. District Court Judge Richard H. Kyle of Minneapolis ordered that the city’s Occupy group and Hennepin County officials participate in an expedited settlement conference.

“The court notes, regardless of this order, that plaintiffs are unlikely to leave the plazas [adjacent to the Hennepin County Government Center] anytime soon,” Kyle wrote in his order concerning Occupy Minneapolis’ motion for a temporary restraining order. “The county has recognized that plaintiffs may assemble there during any hour of the day, and plaintiffs have indicated their willingness to do so for the foreseeable future. Hence, the parties are going to have to ‘learn to live’ with one another.”