Days before he was shot and killed, Montrell Jackson posted an emotional message on Facebook, about how hard it was to be a black police officer in Baton Rouge.
“I love this city, but I wonder if this city loves me,” he wrote.
On Sunday, he was shot dead along with two other police officers in the city. Three other officers were also wounded before the gunman was killed by police.
Jackson’s post has now been seen and shared by thousands of people.
Discussing the difficulties of being a police officer and a black man in America currently, he said he was “disappointed in some family, friends and officers for some reckless comments”.
“In uniform I get nasty hateful looks and out of uniform some consider me a threat.”
He ends his post saying: “These are trying times. This city must and will get better. I’m working in these streets so any protesters, officers, friends, family, or whoever, if you see me and need a hug or want to say a prayer. I got you.”
His original Facebook post, reposted by friend Kristi Vick Godal after his death, has now been shared more than 4,000 times, with lots of people reacting to it.