Police say they briefly detained but then had to release an armed robbery suspect less than an hour before he allegedly murdered a 27-year-old outside a Long Beach 7-Eleven last month.

Darrell Brock and a coconspirator are accused of shooting Isaac “Duke” Marshell to death in what police called an “unprovoked attack” on the evening of June 27.

About 45 minutes before the shooting, someone flagged down officers to report that Brock pointed a gun at them and tried to rob them in the same area, near Long Beach Boulevard and 10th Street, according to Long Beach Police Department spokesman Richard Mejia.

The victim pointed Brock out to officers but then said he didn’t want to be involved in pressing charges and left the scene, police said. Officers detained Brock, but when they searched him and didn’t find a gun, they let him go, according to Mejia.

Police said they did not have enough evidence to arrest Brock, so he was released “pending further investigation.”

About half an hour after the attempted robbery report, police were again called about Brock, according to Mejia. Someone reported him as an “unwelcome guest,” but officers didn’t immediately respond because they had other higher-priority calls, Mejia said.

Nine minutes later, the call was upgraded when someone reported there was a gun involved, according to police.

Officers began hurrying to the scene, but before they could get there, Marshell was killed.

Police say Brock and his coconspirator, 33-year-old Carlos Hernandez, got into a fight with Marshell in the parking lot, and a witness told the Long Beach Post that the altercation appeared to begin when they tried to snatch Marshell’s phone.

Marshell briefly left the scene after the fight subsided, but then headed back to the shopping center, where, according to friends and family, he was trying to buy something to eat after getting off work at the Port of Long Beach.

When Marshell returned, Brock and Hernandez shot him in the back, according to authorities.

June 27 was not the first time police had run-ins with Brock. A day before the killing, Brock’s friends called police to report he was displaying “unusual behavior,” according to Mejia, but when officers got to the scene, the friends said they would take care of Brock and left with him.

After Marshell’s death, police arrested Brock and Hernandez. They’ve both pleaded not guilty to murder and remain jailed on $3 million and $2 million bail, respectively. Hernandez faces an additional charge of assault with a deadly weapon to which he has also pleaded not guilty.

Cal State was forced to deal with sexual harassment allegations. A new report finds it repeatedly fell short