The man being questioned on suspicion of the murder of Detective Garda Colm Horkan has a history of mental health issues and is known to local officers.
The 43-year-old was arrested at the scene at around midnight on Wednesday after Det Gda Horkan was shot a number of times with his official garda firearm.
Gardai are still continuing to investigate the circumstances which led up to the fatal shooting, but at this stage it is believed the detective approached the suspect and engaged in a conversation with him before the situation escalated.
During the struggle Det Gda Horkan was overpowered and his weapon taken by the alleged assailant before the full 15 rounds in the magazine of the Sig pistol were discharged.
The suspect was detained a short time later and is currently being held at Castlerea Garda Station under the Offences Against The State Act 1939.
The man had been residing in the Foxford area of Mayo, but was also known to stay in Castlerea, where Wednesday night's murder took place.
Sources said the murder suspect does not have any serious criminal convictions but was known to local gardai previously for involvement in minor matters.
He has been detained a number of times under the Mental Health Act, as well as for road traffic matters.
It is believed he had recently returned to the Republic from the UK.
"He was known around the town for driving about on his motorbike and hassling people, but there was nothing in his past related to violence," a source said.
"Gardai in Castlerea have come across him several times and he's regarded as a nuisance, but that was the extent of it until the events of Wednesday night," the source added.
After the incident the suspect was detained and taken to the station without putting up any resistance.
It is understood the suspect, a motorcycle enthusiast, also has family in Co Mayo.
He does not have a recorded criminal conviction in Ireland in the past 10 years, but gardai have been attempting to learn more about his time over in the UK.
Officers believe there is a chance the alleged assailant and Det Gda Horkan were known to each other as the late officer was well known in the Castlerea area.
Garda Commissioner Drew Harris said the incident was "random" and not linked to any organised crime element or subversive cause.
During his detention in custody the suspect has been assessed. He can be held for up to three days before a decision is made to either charge him or release him, pending a file to the DPP.