BATON ROUGE, Louisiana — Three police officers are dead. Two more are wounded. And a sheriff's deputy is fighting for his life they were all being shot by a gunman who attacked the officers on Sunday.

The slain officers include a man who had only recently joined the force and a 10-year veteran with a reputation for heroism. Marine veteran Matthew Gerald had only been patrolling on his own for 12 days before he was shot and killed. Officer Montrell Jackson was once injured in the line of duty, according to The Advocate, trying to save a toddler from a burning building.

Meanwhile, a 41-year-old deputy is in critical condition and two others are being treated for non-life threatening injuries after they exchanged gunfire with a man, according to authorities at a press conference Sunday afternoon. The shots were heard across America, which is reeling with the second large-scale attack on police officers since five were murdered in Dallas. President Obama in a statement called it an attack on "civilized society."

Col. Mike Edmonson of the Louisiana State Police told reporters that police received a call at 8:40 a.m. of a man carrying a rifle around the B-Quik gas station and convenience store just a mile from the police station. At the same time, two officers on the scene radioed they observed an individual in all black with a rifle. Two minutes later, at 8:42, came a call of shots fired. At 8:44 units from the East Baton Rouge Sheriff's Office arrived and exchanged fire with the suspect, killing him. Part of the exchange was captured by an eyewitness.

Police did not immediately disclose any additional details about the suspect, but CBS and NBS News, citing law enforcement sources, identified the alleged gunman as 29-year-old Gavin Long of Kansas City, Missouri.

Immediately after the shooting, police asked the public to be on the lookout for men wearing all black or all camouflage. Hours later, police got a call from a Walmart store of two men wearing black t-shirts and camouflage shorts, according to The Advocate. The men, driving a car with Texas license plates, were apprehended at a gas station in Addis, southwest of Baton Rouge. It is not known if the men were arrested in connection to the shooting.

The Baton Rouge attack on police is the latest in a string of violence involving police that began when two white Baton Rouge cops shot and killed Alton Sterling, a black man who was selling CDs at a convenience store. A day later, a Hispanic officer in Falcon Heights, Minnesota shot and killed Philando Castile during a traffic stop. The killings kicked off a mass mobilization of Black Lives Matters protests across the country, including in Dallas where black militant Micah Johnson killed five police officers in Dallas in apparent revenge for Sterling and Castile's deaths.

Last Friday, Baton Rouge police said they had broken up a plot to kill police officers with firearms stolen from a pawn shop.

The cycle of violence was almost too much to take, officer Jackson wrote in a haunting Facebook post days before he was killed.

“I’ve experienced so much in my short life and the past 3 days have tested me to the core,” he wrote. “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.”

President Obama denounced the second large-scale attack on law enforcement in as many weeks.

Calling it an "attack on all of us," Obama made his remarks just a week after he eulogized five officers murdered in Dallas. "I said that killer would not be the last person who tries to make us turn on each other, nor will today's killer," he said, adding, "That's up to us."

East Baton Rouge Sheriff Sid Gautreaux echoed Obama's sentiment at a press conference before the president spoke.

“With God’s help we will get through this. To me, this is not so much about gun control as it is about what’s in men’s hearts. And until we come together as a nation and as a people to heal as a people. Iif we don’t do that and this madness continues, we will surely perish as a people.”