PORTLAND, Ore. — Portland Mayor Ted Wheeler said weeks of planning paid off and helped keep violence down at Saturday’s rallies between right- and left-wing groups.

Wheeler said he doesn't know the exact number yet, but estimated the rallies cost the city millions of dollars. It's money he said should be going to other city services.

"We don't know the exact cost, but it comes No. 1 in terms of public resources that were expended," Wheeler said. "If we're spending money on demonstrations, we're not spending money on addressing homelessness, or picking up the trash, or other public safety issues, and it's also clear that this took a toll on the business community."

RELATED: Portland mayor urges residents to shop at downtown businesses hurt by protests

Portland police said around 1,200 people took part in the demonstrations. Wheeler said the city prepared for the worst-case scenario and the possibility of widespread violence, but violence was kept to a minimum and protesters were contained to only parts of the city.

"Even though it was largely a successful policing action, it still hurt this community and the people who live here, the people who want to go about their business," Wheeler said.

It took more than 700 officers to keep the peace. The department took a new approach. It put a police liaison with each group and tried to keep the opposing sides away from each other. That helped keep violence down and helped the city have a better idea of what was going.

The city also set up communication centers, so they could get information out quickly, address misconceptions, and dispel rumors that popped up online.

The mayor said planning for the protest took weeks of work alongside federal, state, and local agencies. Planning for weeks was part of the cost, along with day-of costs, like overtime for officers on the streets.

Thirteen people were arrested. Two were juveniles. The majority of people were cited and released for things like disorderly conduct, interfering with police, and having weapons in a park.

RELATED: Timeline: 13 arrested during dueling demonstrations in Portland on Aug. 17

Damien McKinnon and Alexander Dial were both booked into jail. McKinnon was unidentified until Monday afternoon. Court documents said he was tackled by an officer after police saw him get into a fight and run into the street in front of cars.

Police said Dial was part of the group seen attacking a bus with people from far-right groups on board. KGW spoke with Dial over the phone Monday after he was released from jail. He said he's already getting threats and didn't want to do an interview for safety reasons.

Wheeler said every demonstration is different, but they plan to use some of the same strategies moving forward, which could be soon, since one of the event organizers, who was from Florida, said far-right groups plan to come here and demonstrate every single month.

"We're going to continue to speak out against hate and against violence, and at the end of the day we're going to keep watching them, keep holding people accountable, and if they violate the law, they'll be arrested," Wheeler said. "We're going to make it very inconvenient for them to come here, if they're objective is not to engage peacefully."

RELATED: 'You want to be hateful? Stay home': Coalition calls for peace ahead of planned Saturday dueling protests

Police said if they get information about a future event they'll evaluate it and tailor their response appropriately.

KGW asked to speak with Portland Police Chief Danielle Outlaw, but was told she was not available.