Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

BATON ROUGE, Louisiana — The gunman who killed three Baton Rouge police officers did not lure them to their deaths on Sunday but instead carried out the ambush after a member of the public called 911, an official told NBC News.

Police do not think that tipster was the attacker or an accomplice, Louisiana State Police Col. Mike Edmonson said.

Related: Suspected Baton Rouge Shooter Hinted at Defense of 'Justice'

“It was someone who was calling in,” he said, adding that there “was no indication” that the initial call was “trying to lure someone here.”

Edmonson added: "’A guy with a gun’ — that's all [the 911 caller] said."

The shooter was identified as Gavin Long, 29, of Kansas City, Missouri. Edmonson said Long had been in Baton Rouge for days before he carried out the attack. Investigators are now looking for people who saw or spoke with him during that time.

Long was also apparently in Dallas after five officers were shot and killed there last week, according to a video posted on a Twitter account that a senior law enforcement official said belonged to the suspect. The video, posted on July 10 — three days after the attack in that city — was titled: “My body-cam footage of me in Dallas out in them streets educating our people.”

Related: Suspected Baton Rouge Shooter Hinted at Defense of 'Justice'

The officers were responding to a 911 call in Louisiana's capital city when they were gunned down in an apparent "ambush" around 9 a.m. local time Sunday, Baton Rouge Mayor Kip Holden said earlier.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The rifle used in the shooting was an AR-15-type weapon, law enforcement sources told NBC News. The sources confirmed the rifle was purchased more than a year ago in Missouri.

Law enforcement officials initially believed that two other suspects were at large, but later said the deceased suspect was likely the only shooter.

Long was fatally shot after the three police officers were killed and three others wounded.

On Monday, Edmonson told The Associated Press that Long “certainly was seeking out police officers.”

"His movements, his direction, his attention was on police officers," Edmonson said, using the word “ambush” to describe the attack.

Two of the officers killed were from the Baton Rouge Police Department. They were identified as Officer Montrell Jackson, 32, a 10-year veteran, and Matthew Gerald, 41, who had been serving for less than a year, officials said.

Related: Baton Rouge Shooter Left Long, Twisted Digital Footprint

Brad Garafola, 45, a 24-year veteran of the East Baton Rouge Sheriff's office, was also killed.

Of the three officers injured, one was released from the hospital Monday, according to officials. Our Lady of the Lake Medical Center said in a statement that another officer remained hospitalized there in critical condition. The third wounded officer had suffered non-life-threatening injuries, authorities said Sunday.

Police reopened the Baton Rouge crime scene area to the public early Monday.

Baton Rouge has been roiled by protests since white officers shot and killed Alton Sterling, a 37-year-old black man, on July 5. Four people were arrested last week in an alleged plot to kill police officers, and a fifth was arrested Saturday.

Nationwide protests erupted following Sterling's death and the killing of another black man, Philando Castile, at the hands of a police officer in Minnesota. At one such protest in Dallas, a sniper opened fire on police officers, killing five and injuring more.