A sheriff’s deputy from Colorado was killed when he and fellow officers faced a barrage of gunfire after responding to a call about a disturbance in an apartment complex in a Denver suburb.

Zackari Parrish, a 29-year-old deputy, died Sunday morning, while three other deputies and a police officer from another department were injured. Authorities have released few details about what transpired inside an apartment unit in Highlands Ranch, Colorado, a few miles south of Denver, where Parrish and the others responded after receiving a noise complaint.

But Douglas County Sheriff Tony Spurlock described the shooting as “an ambush-type attack on our officers” by a still-unnamed gunman.

“I do know that all of them were shot very, very quickly,” Spurlock said at a news conference. “And they all went down almost within seconds of each other. … He knew we were coming. We obviously let him know that we were there to investigate a disturbance.”

Sheriff’s deputies were first called to the apartment at 3 a.m., when a man told officers his roommate was acting bizarrely and might be having a mental breakdown. The sheriff’s office said the officers left less than an hour later after determining that no one had committed a crime.

Deputies were called again shortly after 5 a.m. Four deputies who arrived within minutes of each other went inside after the suspect’s roommate, who had left the apartment, went back and gave the officers a key to get in, according to the sheriff’s office.

The deputies were shot minutes later as the gunman barricaded himself inside a bedroom, Spurlock said

Parrish was shot multiple times. The other officers were able to crawl to safety as bullets continued to rain on them, but they were unable to pull Parrish out because of their injuries, Spurlock said.

A SWAT team went inside the apartment around 7:30 a.m., the sheriff’s office said. The suspect was shot and killed, while an officer from another police department was injured during an exchange of gunfire.

The gunman had unleashed at least 100 rounds from a rifle, Spurlock said.

The wounded officers are Michael Doyle, 28, Taylor Davis, 30, Jeff Pelle, 32, all of whom are sheriff’s deputies, and Tom O’Donnell, 41, an officer with the nearby Castle Rock Police Department. All are listed in stable condition, Spurlock said. The gunman also shot two citizens, who suffered injuries not considered life-threatening.

Spurlock said the deputies talked to the suspect before he barricaded himself, but how and why the situation inside the residence at Cooper Canyon Apartment Homes escalated so quickly remains unclear. Investigators are hoping that footage from body cameras the officers were wearing would paint a clearer picture, Spurlock said.

Authorities have not released the suspect’s name. Spurlock said the man has had encounters with law enforcement in the area, though he had no criminal history.

The sheriff’s office initially said that the officers were responding to a domestic violence incident, but Spurlock said they later realized that wasn’t the case.

Spurlock said the suspect’s roommate, who wasn’t in the apartment when shots rang out, is cooperating with detectives.

Steven Silknitter, 50, said he was at work when his son called and told him there was a shooter at his apartment complex. He rushed home, but couldn’t get inside the complex because police had blocked the entrance.

As he was sitting outside, calling his fiance who was sleeping inside their apartment, he heard “a clear exchange of volley of gunshots.”

“Not in Highland Ranch, Colorado, not in our apartment. Lived here for three years, quiet, nothing out of the norm. People go to work and [have] families, and then to wake up to a barrage of gunfire just a couple of buildings away from us,” said Silknitter, an overnight truck driver who goes to school part-time.

The shooting prompted a tweet from President Donald Trump, who offered his condolences from his Mar-a-Lago resort in Palm Beach, Florida.

“He tweeted: “My deepest condolences to the victims of the terrible shooting in Douglas County @DCSheriff, and their families. We love our police and law enforcement — God Bless them all!”

Later Sunday, a motorcade escorted Parrish’s body from a hospital. People held and waved American flags as the officer’s motorcade passed by.

Parrish began working at the sheriff’s office about seven months ago, Spurlock said. Before that, he was an officer for another police department for 2½ years, the sheriff’s office said. He is survived by his wife and two young children. Spurlock said he had spoken with Parrish’s widow.

“I can’t tell you how difficult it is for a leader to sit down with the spouse of an officer who’s killed in the line of duty,” Spurlock told reporters. “They had many hopes and dreams. He was doing his job, and he was doing his job well. … When I sat with his wife and held her hand, I could see in her eyes, her life is over.”

Tyler Scott, who said he is close friends with Parrish and his family, set up a GoFundMe campaign to help the officer’s widow and daughters. A spokeswoman for GoFundMe said the organization is working with Scott and guarantees that the funds raised will go to the Parrish family.

Parrish had a brief career in sales before he became a law enforcement officer, Scott wrote on the GoFundMe page.

“Zack fed off adrenaline,” he wrote. “From snowboarding in the backcountry, to his job as a Douglas County police officer, Zack didn’t back down to any challenges or fear.”

Follow the Bangor Daily News on Facebook for the latest Maine news.