WASHINGTON: A former African-American US Marine killed three police officers in Baton Rouge, Louisiana on his birthday, in an incident similar the July 5 Dallas attacks, where another former black soldier killed five policemen.
On Sunday, a man identified as Gavin Long of Kansas city went on a shooting rampage on his 29th birthday that left two police officers and a sheriff's deputy dead, CNN quoted police sources as saying.
Long, was a former Marine who spent time in Iraq and was discharged at the rank of sergeant in 2010, according to the US military.
Police officers who responded to Sunday's shootings killed Long in a gunbattle after the other officers were ambushed, the police sources told CNN.
The murder weapon was an AR-15 style semi-automatic rifle, according to law enforcement officials.
Police have not officially released the names of the victims but one was identified by family members as Officer Montrell Jackson. Law officers Matthew Gerald and Brad Garafola were also killed. That was corroborated with social media posts.
The gunman also critically injured a deputy who is "fighting for his life", said East Baton Rouge Parish Sheriff Sid Gautreaux.
Another wounded deputy and police officer have non-life-threatening wounds, law officers said.
Jackson had posted on Facebook on July 8 how physically and emotionally drained he had been since protests had erupted in Baton Rouge after the July 5 killing of the unarmed African-American man, Alton Sterling by police.
"I swear to God I love this city, but I wonder if this city loves me. In uniform I get nasty, hateful looks and out of uniform some consider me a threat. ... These are trying times. Please don't let hate infect your heart," CNN reported citing Jackson's post.
Long was a prolific user of social media, with dozens of videos, podcasts, tweets and posts under his pseudonym 'Cosmo Setepenra'.
Under that name, Long also tweeted a link to a news story about Dallas shooter Micah Johnson and said the shooter was "one of us! # MY Religion is Justice", CNN added.
President Barack Obama on Sunday condemned the killings and all attacks on law enforcement.
"We as a nation have to be loud and clear that nothing justifies violence against law enforcement," Obama said.
"Attacks on police are an attack on all of us and the rule of law that makes society possible," CNN quoted the President as saying.
The Federal Bureau of Investigation (FBI) has launched a probe.