MONTREAL -- A Quebec police constable who died in the line of duty has been remembered by friends as a go-to guy who was always ready to lend an ear.

"In my heart, I lost a brother," Simon Villeneuve said of his friend, Thierry Leroux, who was shot Saturday night as he and another officer responded to a domestic call.

Leroux, 26, was a relative rookie -- he had just six months service under his belt for the police force in Lac-Simon, a small Algonquin reserve in northwestern Quebec.

Villeneuve says their friendship blossomed while they lived together at school. They became fast friends -- study and gym partners.

Villeneuve would seek out Leroux when he was feeling down and said the latter was always there to listen.

"Today, you've left us without me being able to do anything for you," he said. "I love you, friend. Watch over us from above."

Many of the young man's friends expressed their grief by switching their online profile photos to a black ribbon with the Lac-Simon police force's logo.

Leroux's brother, Steffan, also shared an outpouring of grief online.

"A pain so intense that there are no words to describe it," he wrote. "A friend, an accomplice, but especially a brother who will never be replaced."

Investigators said officers did not return fire and that Leroux's partner was taken to hospital in shock.

Provincial police identified the shooter as Anthony Raymond Papatie, 22, of Lac-Simon. He was found dead inside the home of an apparent self-inflicted gunshot wound.

On the alleged shooter's Facebook page, under the name Anthony Raymond Michel, a post on Saturday night offered a glimpse of what had transpired.

"Dsl tout le monde menvo asteur jai tuer un police," he wrote, shorthand French that translates to "Sorry, everyone, I gotta go, I just killed a cop."

At the province's police academy in Nicolet, a moment of silence will be held for Leroux this week during a graduation ceremony.

After completing a police technology degree in Alma, Leroux graduated from the academy in November 2013 -- excelling in sports and physical conditioning.

Academy spokesman Pierre St-Antoine says such tragedies always bring the dangers of the job to the forefront and force cadets to talk about security and training.

"The tragic death of a colleague brings about this discussion," St-Antoine said. "As we know, these are events that, sadly, can happen. They are part of the job of being a police officer."

Asked if better training could help, Premier Philippe Couillard told reporters in St-Felicien, Que., that such events are sometimes inevitable.

"You know, we can always do better," Couillard said. "But there are human tragedies that happen regardless of the precautions we take."

Couillard said his heart goes out to both families implicated in the shooting and he suggested the incident reflects that work with native communities needs to go deeper.

Also on Monday, Prime Minister Justin Trudeau and Ghislain Picard, chief of the assembly of First Nations of Quebec and Labrador, offered their condolences.

"Police officers risk their lives to keep us safe," Trudeau wrote on Twitter. "My deepest condolences to the family of young Thierry Leroux."

Picard expressed his support for the community of about 1,700, which is about 500 kilometres from Montreal.

"This tragedy reminds us once again how much distress can lead to irreparable acts," Picard said in a statement. "We are wholeheartedly thinking about the families, police officers and the grieving communities."

With files from Morgan Lowrie