Less than a week after Tony DeFrances learned that he was being demoted as part of a downsizing of his company, authorities said he walked into his boss’s office Thursday morning for a one-on-one.

Apparently upset about his demotion, DeFrances, armed with a gun, confronted CEO Steven LaVoie, a longtime colleague and friend at the supply technology firm ArrowStream in the Loop, police said.

At some point, DeFrances, 60, and LaVoie, 54, struggled over the gun. LaVoie was shot twice before DeFrances shot himself in the head, Police Supt. Garry McCarthy said.

DeFrances was found dead in LaVoie’s office on the 17th floor of the Bank of America building. LaVoie was in “grave” condition at Northwestern Hospital with head and stomach wounds, McCarthy said after the shooting. He was critical condition this evening, according to a hospital spokeswoman.

DeFrances — who is listed on the company’s website as the chief technology officer — had been told on Friday that he was being demoted, according to police. The firm was in the process of downsizing and had demoted a number of people, McCarthy said.

“Apparently he was despondent over the fact that he got demoted,” McCarthy said of DeFrances, calling the shooting a “personal” dispute.

LaVoie founded ArrowStream in 2000, and DeFrances had been with the firm “virtually since its inception,” according to the company’s website. ArrowStream was named one of Chicago’s best and brightest companies to work for by a business trade group earlier this year, an honor it had received every year since at least 2012.

About 10 witnesses who were in the firm’s office on LaSalle Street when the shooting occurred were interviewed by police, McCarthy said. Witnesses said they heard the shots about 9:55 a.m.

‘Never had any problems’

LaVoie and DeFrances were longtime friends, according to a police source with knowledge of the investigation into the shooting.

“They had been friends for years — a congenial relationship between two friends,” the source said.

LaVoie is married and has three daughters. He was in critical condition and being treated at Northwestern Memorial Hospital, police said. His wife, reached by phone, said she was not ready to talk with the press.

The LaVoie family, in a statement distributed by Northwestern Memorial Hospital, thanked doctors and police for their help and friends and family for support.

“Our thoughts are also with Steven's extended family, the employees of ArrowStream, who mean so much to Steven,” the statement said. “Finally, our prayers are with the other family affected by this tragedy.”

A woman at LaVoie’s home who described herself as “a caretaker and close family friend” said LaVoie’s wife was with him at the hospital.

“He is a wonderful man. He is a private man,” said the woman, who declined to give her name.

A next door neighbor cried as she talked about the shooting. “He is a great guy. He is a very nice man. I can’t fathom this right now.”

DeFrances, who lives in the Lake County community of Tower Lakes, is also married and has three children. Reached by phone Thursday morning, DeFrances’ wife said she did not know about her husband’s alleged involvement in the shooting and expressed shock, but did not comment further. By the afternoon, police stationed outside the DeFrances home said the family had asked for privacy.

Residents in the small wooded community described DeFrances and his family as polite and quiet.

“We’ve never had any problems with them,” said Patricia Covek, who lives a few doors down and saw DeFrances at regular neighborhood gatherings, including about six weeks ago. “This is just very upsetting. My heart goes out to these people.”