ST. LOUIS, Missouri - An off-duty police officer shot and killed a home invader in suburban St. Louis on Saturday evening, and family say the two had recently had an argument about the growing unrest over police violence.

Police say the off-duty officer, who has not been named, was home when the deceased suspect rang the doorbell on Saturday evening.

CBS affiliate KMOV-TV reports the suspect was known to the family. At the time of the incident, the police officer was home with his wife, mother-in-law and two children. They ran upstairs to hide when the suspect appeared.

Get Breaking News Delivered to Your Inbox

The suspect, identified as 20-year-old Tyler Gebhard, then grabbed a concrete planter and threw it through a window in the rear of the house when he was denied entry to the home. Once inside, the off-duty officer shot him. He was pronounced dead at a local hospital.

Police told KMOV the man had emotional issues and had issued threats to the family online before the shooting.

An uncle of Gebhard's, Patrick Brogan, of Waterloo, Illinois, told The St. Louis Post-Dispatch Gebhard and the officer had been arguing on Facebook. He said Gebhard, who was biracial, empathized with the objectives of the Black Lives Matter group.

Police Chief Jon Belmar says the officer is on leave.

(2/2) The suspect, who was known to the family, demanded entry & threw a planter through a glass door. pic.twitter.com/dnDmNRmgEZ — St. Louis County PD (@stlcountypd) July 10, 2016

Deadly shootings last week of black men by police in Louisiana and Minnesota, followed by the sniper killings of five police officers in Dallas, have heightened the tension around protests over police violence. On Saturday, many of those protesters themselves resorted to violence.

Many supporters of police say the protesters have it wrong, and that the Black Lives Matter movement is leading them astray. In an appearance on CBS' "Face the Nation" on Sunday, former New York City Mayor Rudy Giuliani called the movement "inherently racist." Giuliani said cops now feel like they have a target on their backs as a result of the movement.

"Of course black lives matter, and they matter greatly," he said. "But when you focus in on 1 percent of less than 1 percent of the murder that's going on in America and you make it a national thing, and all of you in the media make it much bigger than the black kid that's getting killed in Chicago every 14 hours, you create a disproportion."

Earlier Sunday, President Obama defended Black Lives Matter and the right of activists to demonstrate in cities across the United States, following a long night of ongoing protests over the highly public deaths last week of two black men at the hands of police.

"One of the great things about America is that individual citizens and groups of citizens can petition their government, can protest, can speak truth to power," Mr. Obama told reporters in Madrid. "And that is sometimes messy and controversial but because of that ability to protest and engage in free speech, America over time has gotten better. We've all benefited from that."