Receive the latest national-international updates in your inbox

Authorities continue to investigate Thursday's shootings at a Dallas protest that left five officers dead and the gunman that authorities say was discharged from the Army after claims he sexually assaulted a female soldier. (Published Saturday, July 9, 2016)

The gunman in shootings at protests in Dallas had been sent home from Afghanistan after being accused of sexually harassing a female, and was described as a loner who followed black militant groups on social media.

Micah Xavier Johnson, who fatally shot five officers and wounded seven more before police killed him with a remote-controlled bomb on Friday, lived with family members in the blue-collar suburb of Mesquite, where he played basketball for hours at a time.

For six years starting in 2009, Johnson served in the Army Reserve as a private first class with a specialty in carpentry and masonry, the military said.

In May 2014, six months into his Afghanistan tour, he was accused of sexual harassment by a female soldier. The Army sent him stateside, recommending an "other than honorable discharge," Bradford Glendening, the military lawyer who represented him told The Associated Press.

Dallas Police Chief: 'We Are Asking Cops to Do Too Much'

Dallas Police Chief David Brown talks to reporters following a deadly night in which a dozen police and transit officers were shot, five of them killed.

(Published Monday, July 11, 2016)

That recommendation was "highly unusual," Bradford said, since counseling is usually ordered before more drastic steps are taken.

"In his case, it was apparently so egregious, it was not just the act itself," Glendening said. "I'm sure that this guy was the black sheep of his unit."

Glendening told NBC News that the soldier requested Pfc. Johnson "receive mental help from behavioral health" and a protective order to keep him away from her, her famly and home, according to court filings detailing the allegations.

The chief said Johnson cited the fatal shootings of black men by police officers in Louisiana and Minnesota, which prompted the protest march in Dallas and many other cities.

"The suspect said he was upset with white people and wanted to kill white people, especially white officers," Brown said.

Activists with Black Lives Matter, whose peaceful march police were guarding as he opened fire, repudiated the shootings, and it wasn't immediately clear if Johnson had any connection to the movement, which has disavowed violence.

Friends there said the 25-year-old black man didn't seem interested in politics, but his Facebook page suggests otherwise: He "liked" black militant groups including the African American Defense League and the New Black Panther Party, which was founded in Dallas.

Johnson's photo showed him wearing a dashiki and raising his fist over the words "Black Power," and his cover shot carried the red, black and green Pan-African flag.

A law enforcement official familiar with the investigation tells NBC News that investigators have found no formal ties between Johnson "any kind of violent Black Power, Black Separatist or other domestic terror group."

While the New Black Panther Party is not known for violence, the official said authorities are concerned that Johnson may be part of an emerging trend of people with sympathy for such groups, who are driven to violence and anti-government, anti-police behavior by viral coverage of police brutality, Black Lives Matter protests and other inciting incidents.

The African American Defense League posted a message earlier in the week encouraging violence against police in response to the killing in Louisiana.

"The Pig has shot and killed Alton Sterling in Baton Rouge, Louisiana! You and I know what we must do and I don't mean marching, making a lot of noise, or attending conventions. We must 'Rally The Troops!' It is time to visit Louisiana and hold a barbeque." The message was attributed to Dr. Mauricelm-Lei Millere, a leader in the organization.

The New Black Panther Party's leaders have "long expressed virulently anti-white and anti-Semitic opinions," according to the Southern Poverty Law Center.

Johnson also "liked" the Nation of Islam and the Black Riders Liberation Party, which the center described as "hate groups."

Among Johnson's other social media likes were groups that focus on the history and accomplishments of African-Americans, such as Black Love Matters, the Nubian Rootz Cultural Center, and I Love Black Archaeologist, a web series whose main character uses a time machine to visit famous black people.

Officers Take Cover After Shots Fired Downtown

Dallas police officers take cover after shots were fired during a protest of nationwide officer-involved shootings, July 8, 2016.

(Published Thursday, July 7, 2016)

The Dallas Police Department said Johnson's Facebook account also included information about Richard Griffin, also known as Professor Griff, who "embraces a radical form of Afrocentrism."

On his Facebook page Friday afternoon, Griffin, a member of Public Enemy — an influential hip hop group known for its politically charged lyrics — said he does "not advocate killing Cops."

Johnson had no criminal history, according to authorities. Local court records show his parents were divorced in 1996.

He was believed to have shared a two-story tan brick home in Mesquite with family members. He graduated from John Horn High School in Mesquite, where he was a ROTC member, school district officials said.

Sharon Carter, who works in the district's registrar's office and lives near Johnson's home, said she saw him occasionally wearing military fatigues as he left for Army reservist training, but never saw him armed.

"They say he was standoffish in high school," Carter said. "I never really spoke to him. He kept to himself."

Mayor Mike Rawlings: 'God Bless Dallas'

A relative had praised Johnson on his birthday in 2014 as "definitely Army strong" on his Facebook page, calling him an "entertaining, loving, understanding, not to mention handsome friend, brother (and) son."

After Johnson was killed, a relative posted on her Facebook page, "I keep saying its not true...my eyes hurt from crying. Y him??? And why was he downtown." She did not respond to Facebook messages.

Friend Israel Cooper said Johnson went by "Xavier,' his middle name, had a "cool vibe," wasn't really political and seemed educated.

First Seconds: Protest Erupts into Gunfire

A protest against nationwide officer-involved shootings turns violent in Dallas's downtown area. In the end, five police officers were killed by two men who were in sniping positions above ground, according to authorities. Another 6 officers were injured.

(Published Friday, July 8, 2016)

Cooper said he and Johnson played basketball at a park near his home.

"He would be out there for eight hours," he said. "Like it was his job. Just hoopin'."

Cooper said that when he heard the suspect was Johnson, he "was in disbelief because he's just not like a violent or rough dude."

Obama: America Is 'Horrified' Over Dallas Attack

"I believe I speak for every single American when I say that we are horrified over these events," President Barack Obama said after five police officers were fatally shot in Dallas at a protest Thursday.

(Published Friday, July 8, 2016)

"So I was, 'Nah, it's probably another Xavier somewhere, you know,"' Cooper said. "But then, with pictures on the internet and stuff, I'm like 'OK.'"

Cooper added: "It's the quiet ones that just do the most devastating stuff. You never see it coming. But then it's more expected, like `I should have known."'