The man accused of gunning down two people Wednesday at a Louisville Kroger has a history of mental health problems, violence and of having his guns taken from him, according to court documents and social media posts.

Gregory Alan Bush, 51, is facing two counts of murder and 10 counts of wanton endangerment following the highly public shooting that left one man dead inside the store and a woman slain in the parking lot.

Bush was arrested Wednesday shortly after police said he fled the scene. He was arraigned Thursday morning, with his bail set at $5 million. Although he remains in jail, he was ordered to stay away from all Kroger locations, and a judge banned him from having firearms.

The latest:Feds confirm they're investigating the Kroger shooting as hate crime

Related:Victims of the Louisville Kroger shooting have been identified

Questions swirled after the shooting about whether the shooting was racially motivated.

Bush is white. Both of the victims who were killed in the shooting were black, and one witness said Bush told him that "whites don't shoot whites."

Police said video showed him trying to enter First Baptist Church of Jeffersontown, where the congregation is predominantly black.

The FBI is involved in the case along with local police. U.S. Attorney Russell Coleman said federal investigators are looking for violations of any federal law, including hate crimes.

Bush has a long history with the courts. Details from court filings paint a portrait of a man who identified himself as having Schizoaffective disorder and who had a track record of violence against others.

Related:Man who shot at Kroger shooting suspect not expected to face charges

Louisville Kroger shooting:Here's what we know

Must read:Father of Mayor Fischer's equity chief killed in Kroger shooting

Read this:Woman killed in Louisville Kroger shooting had 'warm and giving heart'

In 2001, Bush's ex-wife sought an emergency protective order against Bush after he allegedly yelled threats at her and twice called her an "(N-word) bitch." A judge barred Bush from having or buying guns as part of that order, which was effective for three years.

Two years later, Bush pleaded guilty to menacing in a case where he followed a 15-year-old girl into the bathroom at a movie theater and put his hands around her waist and told her "that he thought they were family," according to a court document.

And in a 2009 domestic violence case involving his father, Bush was ordered by a judge to surrender his guns and undergo mental health treatment.

Bush's father sought emergency protection from the courts after he said Bush lifted his mother off the ground by her neck and hit him in the jaw. He had been threatening to shoot his parents, with whom he lived, in the days leading up to the January 2009 assault.

"He carries a gun everywhere he goes," his father, William Bush, wrote in his petition to the court. "He is dangerous. He is paranoid. I want him to stay away."

The father also noted in his petition that Bush attempted to kill himself seven years prior and spent "some time" at Central State Hospital, a state mental health facility.

"No guns!" wrote the judge in his 2009 order of protection.

That order expired in 2011.

Jeffersontown Police Chief Sam Rogers said Thursday that authorities are still investigating where Bush got the gun used in the shooting and whether he could legally have it.

Rogers declined Thursday to speculate on motive. He did note that Bush apparently tried to get into First Baptist Church of Jeffersontown, a largely black congregation, only minutes before he went to Kroger. Rogers said Bush did not get into the church.

The chief did not explain why Bush was at the church or say if he was armed at the time.

A Twitter and Facebook account associated with Bush reflects a man who is an ardent University of Kentucky fan who has a keen interest in the science-fiction television series "12 Monkeys" and a tendency to troll the University of Louisville.

The social media accounts also show glimpses of a man who knew he had a mental illness.

A Facebook page that appears to be Bush's says that Bush is on disability because his "paranoid-schizophrenia finally stopped me from working."

"I have worked most of my life and battled mental illness throughout my life," the Facebook page reads.

The page says, "I'm lucky I made it this far with all the trouble I've caused myself when I get off my medicine. I'm lucky my parents are in good health as it took 2 years (to) finally get my (disability). (M)aybe one day I can work again. I'm hoping for the best."

The Courier Journal has not been able to independently verify whether Bush wrote what is on the Facebook page, nor could it confirm whether Bush is on any sort of disability.

And while Kentucky sports posts far outnumber political statements on the @GregoryAlanBush Twitter feed, clues to his sensibilities can be seen in a Sept. 29, 2017, post headlined, “Media Ignore Mass Shooting In Tennessee Because It Doesn't Fit Their Leftist Narrative” and a retweet two days later mocking Colin Kaepernick and the Black Lives Matter movement.

'Whites don't shoot whites':What one man says Kroger shooter told him

More:'Americans are dying' because officials act helpless on gun reform, Fischer says

The Facebook page also includes links to a couple of Change.org petitions, including one to "Save Kentucky's Civil War Historic Monuments" and another calling for a Knox County sheriff's deputy who posted a smiling photo of himself next to an unconscious woman to be reinstated.

Calls on Thursday to a phone number associated with Bush's parents were not returned.

Bush's ex-wife declined through a family member to speak with a reporter Thursday morning.

His son also did not return a message seeking comment but did post on Facebook that he will "not be giving any comments on the matter. I will say that my heart goes out to the families of the two victims that my father killed, and I wish there was something I could do to change that."

In response to a comment on that Facebook post, his son said that the shooting "isn't as much of a hate crime as it is a mental illness issue."

Dakota Dauphinais, 17, a friend of Bush's son, said he had been told growing up that Bush had paranoid Schizophrenia. He said "he's always been a bit weird" but didn't think "he could do something like that."

Dakota, who said he lived a block away from Bush, said "he was like a normal dad. He'd play video games with us."

Reporters Tim Sullivan and Billy Kobin contributed to this report.

Allison Ross: 502-582-4241; aross@courier-journal.com; Twitter: @allisonSross. Support strong local journalism by subscribing today: courier-journal.com/allisonr.

More coverage of the Kroger shooting

Also:Man who shot at Kroger shooting suspect not expected to face charges

Related:Louisville Kroger shooting adds to string of public gun violence

Kroger shooting:We've had enough of the senseless violence

More:Mitch McConnell 'praying' for victims in Louisville Kroger shooting