© Reuters / Mike Segar
A Virginia man was taken to a mental hospital after he approached a predominantly African-American church on Thursday, shouting racial slurs and threatening to kill congregants. It follows Wednesday's shooting of nine people at a church in Charleston.

A video posted by local news outlet WRIC shows the white man outside United Nations Church International in Richmond, rapping on a window and shouting racial slurs.

"All I know is he had a weapon in his hand, banging on the glass, and calling us n*****s," the church's senior pastor, Bishop Oren Pullings, told the station.

Church member Lydia Jones said the man was shouting "You're taking over!" at those inside.

The incident began around 8:45 p.m., when children inside the church first spotted the man.

Although the man was originally feared to be armed, Richmond Police Capt. Chris Gleason told the Richmond Times Dispatch that the man was beating on the door with a piece of plastic.

Those inside were able to quickly barricade themselves in the church until police arrived.

An officer arrived and drew her gun, but the man refused to drop the piece of plastic until seven police cars had arrived.

However, police consulted with the Commonwealth's Attorney's Office and determined that the man had not actually violated the law. He was taken under an emergency commitment order to Tucker Pavilion at Chippenham Hospital for a 72-hour observation.

"I never thought I'd see the day when police have to be at church," Gleason told congregants after the incident had ended.

The Thursday incident came just one day after the fatal shooting at an African-American church in South Carolina, which left nine people dead. The suspect, 21-year-old Dylann Storm Roof, was arrested in Shelby, North Carolina, on Thursday morning. The shooting is being investigated as a hate crime.