MINNEAPOLIS (WCCO) – Two police officers are recovering after they were shot at New Hope City Hall Monday night.

According to the Hennepin County Sheriff’s Office, a man with a long gun opened fire on officers around 7:15 p.m. as they left the council chambers after a swearing-in ceremony for two new officers.

READ MORE: Minnesota Weather: Following Some Friday Showers, It’s Gonna Be A #Top10Wx Weekend!

Police then shot the suspect, identified by family members as 68-year-old Raymond Kmetz, and killed him.

Kmetz’s son, Nathan Kmetz, said the family called police departments in New Hope, nearby Crystal and Minneapolis in August, warning each that his father may retaliate against authorities.

Related: Son Of New Hope Shooting Suspect Killed By Police Speaks

Federal court records show Kmetz had run-ins with New Hope police in the past. In 2009, he sued the department for using excessive force when officers tried to arrest him for making terroristic threats. The case was dismissed.

In a New Hope city council meeting last August, Kmetz spoke to the crowd.

“If I say anything inappropriate to anyone of you people, please let me know,” Kmetz said. “It sounds like I’m trying to assault you, or harass me, please let me know.”

Kmetz’s family said his mental state was getting worse from then on.

They say he lost his New Hope home and landscaping business that same year and was committed to a mental health facility. Court records show his wife filed for divorce in 2010.

According to Hennepin County, Kmetz was civilly committed to a psychiatric hospital in St. Peter. He was released in July of 2013.

Attorney Marsh Halberg says Kmetz’s commitment was an extreme case.

“You’ve got to be mentally ill, you have to be a danger to yourself or others or some other fine print or third, it has to be the least-restrictive means — so usually it’s people who are quite severely mentally ill.” Halberg said.

Just this past October, Hennepin County Court records show the Crystal police chief took out a restraining order on Kmetz after an incident where he allegedly tried to run over an officer with a bulldozer.

While Kmetz had a rocky history with authorities, it was unclear what his motive was Tuesday night.

Nathan Kmetz said that if his father had wanted to kill someone during the rampage, he could have. He said his father was an avid hunter and skilled with a rifle.

READ MORE: Pedestrian Dies After Being Struck By Tractor In Traverse County

“Unfortunately I think it’s common where you have cases like this where you have concerned family members doing the best they can to try and get help for someone, they know it better than anyone, they see it on a day to day basis, they see all the warning flags,” Halberg said.

The two officers shot during Monday’s night incident were taken to the North Memorial Medical Center. They were identified by authorities as officers Joshua Eernisse and Beau Schoenhard.

Both officers received medical treatment and were released from the hospital on Tuesday.

Eernisse was one of the officers being sworn in Monday night.

Schoenhard told WCCO-TV he is home spending time with family.

He said he’s “glad his fellow officers are okay.”

Video from inside that city council meeting shows the moment the gunfire started. (Click here to watch the full video. Note: Includes strong language.)

The man saying “get down and stay down” is New Hope City Council Member John Elder. He is on the left side of the screen holding a gun.

Elder used to be a police officer. He also works as a public information officer for the Minneapolis Police Department.

WCCO-TV has reached out to Elder, but he has yet to comment on the shooting.

New Hope City council member Eric Lammle released a statement following the incident.

“I would like to thank the men and women of the New Hope Police Department for their actions that saved many lives,” he said. “I would also like to extend my thoughts and prayers to our officers and employees who handled this incident with heroism and professionalism.”

On Tuesday, New Hope City Hall was closed. However, the city’s police department, which is located on the back side of the city hall building, was operating as usual.

One woman stopped by and dropped off donuts as a way to thank the department for its bravery and serving the community.

A police employee said city hall is expected to reopen on Wednesday.

MORE NEWS: Erik Kravchuk Found Guilty In 'Brazen, Violent' Attack That Killed Aleksandre Sambelashvili

The shooting remains under investigation.