Image copyright AP Image caption The picture of Montrell Jackson with his son has been retweeted more than 12,000 times

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.

Image copyright Kristi Vick Godal

"I've experienced so much in my short life and these last three days have tested me to the core," he wrote on 8 July, amid a period of extreme tension between black people and police in the city.

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.

Image copyright APril Kelly Maher

Image copyright Marsha Graves

Image copyright Norris Megan Gautreaux

His name has also been tweeted 123,000 times since he died, with people praising his words and and many quoting them as well as sharing screenshots of his original post.

Image copyright Derek Minor

Image copyright Craig Aston

Image copyright @lloranger

Image copyright Scott Warner

Produced by the BBC's UGC and Social News team