CHARLESTOWN, R.I. — A group of Narragansett Indians ended a weeklong occupation of a tribal government building with a promise to resolve their disagreements with supporters of the tribe’s longtime leader.

The occupiers left the building and handed over its keys to a mediator at about 11:30 p.m. Monday. The breakthrough came after days of mediation that included telephone calls and face-to-face meetings on Christmas Eve and Christmas Day.

“We accomplished what we set out to do and it was time to go,” said one of the occupiers, Councilwoman Chastity Machado, who spent six nights sleeping inside the administration building.

The occupying group was led by tribal council members who were elected in July and who impeached Chief Sachem Matthew Thomas in October. Among their concerns is that he spends too much time in Florida, where he has a home.

Thomas and his supporters don’t recognize the results of the summertime election or the impeachment. Thomas had warned on Thursday his supporters would take back the building by force if the occupiers didn’t leave. Neither side revealed the terms of the deal that ended the occupation.

“It’s been stressful,” said William Devereaux, who represents Thomas and the tribe. “His goal’s always been to do things to benefit the tribe as a whole. I think he recognizes there are issues that need to be discussed.”

Charlestown Police Chief Jeffrey Allen sought help from an outside mediator when the standoff grew increasingly tense last week. The mediation talks included Allen, U.S. Attorney Peter Neronha and the U.S. Interior Department. Neronha now has the keys to the building.

“Our only role in this was to make sure everybody left peacefully,” Allen said.

Allen said the mediation grew more successful after he reached out over the weekend to the Providence-based Institute for the Study and Practice of Nonviolence. Its executive director, P.J. Fox, traveled to Charlestown to join the talks, which were held inside a town fire station.

“If it wasn’t for him I think we’d still be in there,” Allen said.

Machado said she was among more than 20 people inside the building near the end of the occupation. They used a generator for power after someone cut electricity to the building on Friday. She said many of the occupiers missed out on spending Christmas with their children, though some kids brought gifts to the building on Christmas Day and other supporters brought a feast of turkey, succotash and johnnycakes.

The two sides are planning further talks to resolve their disputes. Devereaux and Fox said federal mediators could arrive as early as Wednesday from Washington, D.C.

“We’re all a family and we hate that this was something that needed to be done, but now it’s time to settle issues and get back to being a family,” Machado said.

“It’s going to be a long process but we can do it,” she said.

Along with sending mediators, the U.S. Interior Department said Tuesday that its inspector general has an open investigation involving the tribe, which is why one of its investigators entered the building during the dispute. A special agent “just happened to be there during last week’s events and helped mediate,” said spokeswoman Nancy DiPaolo, who declined to say what the investigation is about. The Interior Department oversees the U.S. Bureau of Indian Affairs.