Several dozen people gathered for a vigil outside a Minneapolis apartment building where police fatally shot a man during an hours-long standoff that began with gunfire before officers arrived.

Family members and friends on Thursday night mourned the death of Andrew Tekle Sundberg, a 20-year-old who police said fired gunshots from his apartment in a standoff that began Wednesday night and stretched into early Thursday.

Two Minneapolis officers fired their rifles, ending the standoff and fatally wounding Sundberg, according to the Bureau of Criminal Apprehension, which is leading the investigation. A firearm was recovered at the scene, according to the BCA.

Authorities did not say what prompted officers to shoot Sundberg after hours of negotiations to try to persuade him to surrender.

MINNEAPOLIS SCHOOL BUS DRIVER SHOT IN HEAD WHILE YOUNG CHILDREN WERE ON BOARD: POLICE

Some brought flowers to the vigil outside the apartment building, where Sundberg's name was written on the sidewalk with candles placed around it, the Star Tribune reported. His sister spoke briefly at the vigil and thanked those in attendance, but didn't give her full name.

The city identified the officers who fired their guns as Aaron Pearson and Zachary Seraphine.

A spokesman for their union, Police Officers Federation of Minneapolis, did not immediately return a call for comment.

AMIR LOCKE SHOOTING: MINNEAPOLIS POLICE RELEASE BODYCAM FOOTAGE SHOWING OFFICER OPENING FIRE

Sandberg's death was the second fatal encounter involving Minneapolis police this year following the shooting of Amir Locke at a downtown apartment on Feb. 2 while executing an early morning no-knock search warrant, and both officers were at the scene when Locke was shot.

Tekle Sundberg's name is written in chalk during a vigil

Family and friends of Andrew Tekle Sundberg gathered to mourn his death after he was fatally shot by police. (Aaron Lavinsky/Star Tribune via AP)

Pearson, a member of the SWAT team, used a key to enter the apartment where the 22-year-old Locke stirred beneath a blanket on the couch and reached for a handgun. Officer Mark Hanneman fatally shot Locke within 10 seconds — an encounter captured on Pearson’s body camera. Seraphine, a SWAT team medic, provided medical care to Locke on the scene, according to the BCA.

No officers were charged in Locke's death. Minnesota prosecutors said Hanneman's use of deadly force was justified.

The Minneapolis Police Department has long been under scrutiny over allegations of brutality and racial injustice. The police killing of George Floyd in May 2020 led to a state investigation into police practices, and the city and department are working to address problems that were found.

On Wednesday night, officers responded after a third-floor tenant called 911 to report that someone had fired gunshots through the wall of her apartment, police said.

MINNESOTA PARK SHOOTING LEADS TO 8 WOUNDED, SOME IN CRITICAL CONDITION

Officers moved the woman and her two young children, as well as others, to safety. Police said the focus then turned to a man who had isolated himself in a neighboring apartment, a man later identified as Sundberg.

Attempts were made to negotiate with him by phone and by loudspeaker, said Minneapolis police spokesman Garrett Parten. Sundberg was shot about 4:30 a.m. Thursday and taken to a hospital, where he died, officials said.

"This is not the outcome we hoped for or desired," Parten said.