By Lisa Maria Garza

DALLAS (Reuters) - A Texas teenager was arrested on Monday on suspicion of posting a photo on social media showing an air rifle that was accompanied by text that police saw as a threat of violence against Fort Worth officers, police said.

The 17-year-old has been charged with making a terrorist threat for a Dec. 22 tweet that showed an image of an air rifle pointed at a police car with the caption: "Should I do it? They don't care for a black male anyways!"

A lawyer is not listed for the youth in online jail records. His bond is set at $500.

The Fort Worth Police Department Homeland Security/Intelligence Unit launched an investigation and determined the photo was a "threat of violence toward police officers," according to a press release.

"It's not a joke. When we feel threatened, we will act on it," Fort Worth Police spokeswoman Tamara Pena said at a news conference.

The threat made by the black teenager in Texas comes as attention on racially charged shooting incidents involving police has increased nationwide after a white officer fatally shot an unarmed black teenager in Ferguson, Missouri, in August.

In New York over the weekend, thousands gathered for the funeral for one of two police officers ambushed by a gunman who said he was avenging the killing of unarmed black men by police.

(Reporting by Lisa Maria Garza; Wrtiting by Jon Herskovitz; Editing by Mohammad Zargham)