Updated

The former Marine who killed three law enforcement officers in Baton Rouge Sunday may have spent days "hunting" cops and staking out the gas station where the shocking attack occurred, police sources said.

A portrait of Gavin Long, who was killed by return fire from police, is beginning to emerge, including his ascent to the rank of sergeant and his one-year deployment to Iraq in 2008. Investigators going through his computer and cellphone are eyeing two unidentified people he had contact with, including one they have talked to and another they are searching for, sources told Fox News.

Police believe Long, who was wearing body armor during his attack, had been in Baton Rouge for six days and knew that cops often frequented the gas station and car wash where the shooting unfolded, sources said. One of the officers shot was vacuuming his car at the time.

The FBI was running down Long's social media activity and phone records to flag people he may have contacted and why he targeted Baton Rouge.

Long was associated with the Nation of Islam, the militant Muslim group led by Louis Farrakhan, according to a report by The Daily Caller. That report cited YouTube videos in which a person believed to be Long called for violence against white America, and revenge for the death of Alton Sterling, a black man killed July 5 while being arrested by Baton Rouge police.

“If I would have been there with Alton — clap,” Long says in a video posted on July 14.

The three murdered cops have been identified as Montrell Jackson, Matthew Gerald and Brad Garafola. Another police officer was in critical condition and two suffered non-life-threatening injuries.

While in the military, Long was awarded several medals, including one for good conduct, and received an honorable discharge. His occupational expertise was listed as "data network specialist."

1280 br cops

From left to right: Montrell Jackson, Matthew Gerald and Brad Garafola. (AP)

The University of Alabama issued a statement saying Long attended classes for one semester in the spring of 2012. A school spokesman said university police had no interactions with him.

Law enforcement sources told the Baton Rouge newspaper The Advocate, that Long’s military records matches that of a so-called “spiritual adviser,” life coach and author who went by the name "Cosmo Setepenra." The persona claimed to have been in Dallas during the protests over the police shooting deaths of Sterling as well as the racially charged police shooting of Philando Castile in Minnesota.

The paper reported that Long posted a video in a YouTube series called Convos with Cosmos titled “Protesting, Oppression and how to deal with Bullies,” where he talked about Sterling’s death and the protests that came after it.

Jackson, who was black, posted a message on Facebook on July 8, just three days after the death of Sterling, a 37-year-old black man killed by white Baton Rouge officers after a scuffle at a convenience store.

In the message, the 32-year-old Jackson said he was physically and emotionally tired and complained that while in uniform, he gets nasty looks. When he's out of uniform, he said, some people consider him a threat.

A friend of Jackson's family, Erika Green, confirmed the posting, which is no longer on Facebook. A screenshot of the image was circulating widely on the internet.

Gerald, 41, has served on the force for less than a year.

Garafola has been with the sheriff’s office for 24 years, Casey Rayborn Hicks told the Associated Press.

Hicks also identified the injured sheriff's deputies as 41-year-old Nicholas Tullier, an 18-year veteran, and 51-year-old Bruce Simmons, a 23-year veteran.

Hicks said that Tullier is in critical condition while Simmons has non-life-threatening injuries.

The shooting began at the gas station on Airline Highway. According to radio traffic, Baton Rouge police answered a report of a man with an assault rifle and were met by gunfire. For several long minutes, they didn’t know where the shooting was coming from.

The radio exchanges were made public Sunday by the website Broadcastify.

Nearly 2½ minutes after the first report of an officer getting shot, an officer on the scene is heard saying police do not know the shooter's location.

Almost 6 minutes pass after the first shots are reported before police say they have determined the shooter's location. About 30 seconds later, someone says shots are still being fired.

The recording lasts about 17 minutes and includes urgent calls for an armored personnel carrier called a BearCat.

"There simply is no place for more violence," Louisiana Gov. John Bel Edwards said. "It doesn't further the conversation. It doesn't address any injustice perceived or real. It is just an injustice in and of itself."

The FBI and the ATF were on scene, helping state and local police investigate what is being described as a "very large crime scene."

President Obama said in an address Sunday that the shooting deaths underscore the danger police face every day.

"Our hearts go out to the families who are grieving, go out to the officer fighting for his life," Obama said.

Major Doug Cain said that the individuals from Addis were questioned and released, but that the investigation was still ongoing. He said no charges were filed against them.

Sterling's nephew condemned the killing of the three Baton Rouge officers. Terrance Carter spoke Sunday to The Associated Press by telephone, saying the family just wants peace.

"My uncle wouldn't want this," Carter said. "He wasn't this type of man."

Fox News' Catherine Herridge, Lucas Tomlinson, Bree Tracey, Leland Vittert and the Associated Press contributed to this report.