A Pennsylvania police officer has been put on desk duty after posting what appeared to have been a celebration of the death of up-and-coming rapper Jimmy Wopo on social media.

Pittsburgh's police department said it was investigating the post by officer Brian Martin, who reportedly said he was “celebrating” the rapper’s death during a Facebook exchange.

He had immediately been referred "for a full investigation" after the force became aware of the post, the city said in a statement posted online.

It added: “We will hold this officer accountable for his actions. Comments that disparage victims and endanger the community and fellow officers will not be tolerated by the City of Pittsburgh. Such behaviour is a poor reflection on the Bureau and will not be tolerated.”

It is not clear when the social media exchange took place, but Facebook users who saw it reportedly shared screenshots of the encounter online.

A user said they were protesting the death of the rapper, adding that recent protests surrounding the shooting death in the city of 17-year-old Antwon Rose II showed that Wopo has been forgotten about.

Mr Rose II was unarmed when he was killed on 19 June by a police officer who had been sworn in just hours before the incident. The officer has since been charged with criminal homicide, which could carry a maximum penalty of life in prison.

“No one protesting for him?” part of the social media post says, referring to the slain rapper. “Everyone forgot about the wopo (sic) murder that quick?”

Black Lives Matter organises march to Trump Tower Show all 15 1 /15 Black Lives Matter organises march to Trump Tower Black Lives Matter organises march to Trump Tower Kandy Freeman participates in a Black Lives Matter protest in front of Trump Tower in New York City, U.S. January 14, 2017. Stephanie Keith/Reuters Black Lives Matter organises march to Trump Tower People participate in a Black Lives Matter protest in front of Trump Tower in New York City, U.S. January 14, 2017. Stephanie Keith/Reuters Black Lives Matter organises march to Trump Tower Hawk Newsome, a Black Lives Matter activist, leads a protest outside Trump Tower in New York City on January 14, 2017. Dominick Reuter/AFP/Getty Images Black Lives Matter organises march to Trump Tower Hawk Newsome (C) leads a chant during a Black Lives Matter protest in front of Trump Tower in New York City, US. January 14, 2017. Dominick Reuter/AFP/Getty Images Black Lives Matter organises march to Trump Tower People participate in a Black Lives Matter protest in front of Trump Tower in New York City, U.S. January 14, 2017. Stephanie Keith/Reuters Black Lives Matter organises march to Trump Tower An NYPD officer speaks with a Black Lives Matter leaders during a protest in the snow outside Trump Tower in New York City on January 14, 2017. Dominick Reuter/AFP/Getty Images Black Lives Matter organises march to Trump Tower Kandy Freeman participates in a Black Lives Matter protest in front of Trump Tower in New York City, U.S. January 14, 2017. Stephanie Keith/Reuters Black Lives Matter organises march to Trump Tower An NYPD officer speaks with a Black Lives Matter leaders during a protest in the snow outside Trump Tower in New York City on January 14, 2017. Dominick Reuter/AFP/Getty Images Black Lives Matter organises march to Trump Tower Carol Garza, a Black Lives Matter supporter, protests outside Trump Tower in New York City on January 14, 2017. Dominick Reuter/AFP/Getty Images Black Lives Matter organises march to Trump Tower People participate in a Black Lives Matter protest in front of Trump Tower in New York City, U.S. January 14, 2017. Stephanie Keith/Reuters Black Lives Matter organises march to Trump Tower A Black Lives Matter supporter protests in the snow outside Trump Tower in New York City on January 14, 2017. Dominick Reuter/AFP/Getty Images Black Lives Matter organises march to Trump Tower Black Lives Matter activists march in front of Trump Tower on January 14, 2017 in New York City. Kevin Hagen/Getty Black Lives Matter organises march to Trump Tower Black Lives Matter activists march in front of Trump Tower on January 14, 2017 in New York City. Kevin Hagen/Getty Black Lives Matter organises march to Trump Tower Black Lives Matter supporters protest in the snow outside Trump Tower in New York City on January 14, 2017. Dominick Reuter/AFP/Getty Images Black Lives Matter organises march to Trump Tower Black Lives Matter Kandy Freeman marches in front of Trump Tower on January 14, 2017 in New York City. Kevin Hagen/Getty

Mr Martin then reportedly replied: “Not me. I’m still celebrating.”

The City of Pittsburgh said that the officer had been placed on “modified duty”. Officials later clarified that that means he is on desk duty.

Wopo was killed on June 18, when a gunman opened fire on his vehicle and hit him alongside another male passenger. The 21-year-old was taken to a hospital where he was pronounced dead.