The gunman who killed five police officers in Dallas has been unmasked as a pervert accused of stalking a female colleague when he was in the US Army.

Micah Johnson, 25, shot dead the officers in a killing spree that began during a march by the campaign group Black Lives Matter, held to protest against the shooting of black people by police.

Now it has emerged that in 2014, Johnson was sent home in disgrace from Afghanistan by the US military after a female soldier begged for protection from him. Another colleague has revealed how the killer used to ‘steal girls’ panties’.

Scroll down for video

Dallas gunman Micah Johnson (left) sexually harassed female soldier Anna Ma (right) and was sent home in disgrace from Afghanistan

Johnson, 25, shot dead five officers in a killing spree that began during a march by the campaign group Black Lives Matter

Anna Ma, 25, accused Johnson of sexual harassment, according to a military lawyer who represented Johnson when he returned home in June 2014

Johnson, a private in the American Army, was deployed to Afghanistan in November 2013 with the 420th Engineer Brigade.

While he was there, his colleague Anna Ma, 25, accused him of sexual harassment, according to a military lawyer who represented Johnson when he returned home in June 2014.

Dallas-based Bradford Glendening said: ‘He made unwanted sexual advances towards her.

‘It was all verbal. He was bothering and harassing her.’

According to legal documents, Anna begged for a ‘protective order against Johnson pertaining to myself, my family home and any other place of residence I may reside at’.

Wells Newsome, who served alongside Johnson in Afghanistan, wrote on Facebook: ‘We all knew he was a pervert cuz [sic] he got caught stealing girls’ panties, but murdering cops is a different story.’

Johnson waived his right to a military court hearing in the wake of the allegations. Despite the claims, he left the Army in April 2015 with an honourable discharge. Glendening said: ‘Someone really screwed up – but to my client’s benefit.’

The shootings on Thursday night were feared to be the work of a group of armed radicals, but it now appears that Johnson was acting alone before he was cornered by police and killed by a bomb carried by a robot.

After his military career, Johnson worked as a driver for a group providing hospital transport for mentally disabled people.

But privately, his festering hatred of white people had begun. On Facebook, he identified himself as a ‘black nationalist’ and gave a black power salute.

Anna begged for a ‘protective order against Johnson pertaining to myself, my family home and any other place of residence I may reside at’, according to legal documents

‘He made unwanted sexual advances towards her. It was all verbal. He was bothering and harassing her’

He ‘liked’ several pages including the New Black Panther Party, the African American Defense League and the Nation of Islam. He attended a gym called Academy of Combat Warrior Acts, which teaches martial arts and weapons classes.

Police raided Johnson’s home on Friday and found a cache of guns, a hand-written journal listing ‘combat tactics’, body armour and bomb-making equipment.

Last night, Anna Ma declined to comment, saying: ‘You should focus on the victims and their families. I’m not answering any questions.’

Gun stores across Dallas reported a sharp increase in trade yesterday. One owner said business was up 20 per cent with customers including off-duty police officers.

And there were fears of copycat attacks across America, with officers shot and wounded in Missouri, Georgia and Tennessee.

Johnson, a private in the American Army, was deployed to Afghanistan in November 2013 with the 420th Engineer Brigade. Right, a photo on Facebook showed him wearing a dashiki and raising his fist