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.
Gardaí are continuing to investigate the circumstances that 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 assailant before the full 15-rounds in the magazine of the Sig pistol were fired.
The suspect was detained a short time later and was last night being held at Castlerea garda station under Section 30 of the Offences Against the State Act 1939.
The man had been living in the Foxford area of Mayo but was also known to stay in Castelrea, where Wednesday night's murder occurred.
Sources said the murder suspect does not have any serious criminal convictions but was known to local gardaí for involvement in minor matters.
He has been detained a number of times under the mental health act as well as road traffic matters.
It is believed he had recently returned from the UK.
One source said: "He was known around the town for driving around on his motorbike and hassling people, but there was nothing in his past related to violence.
"Gardaí 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 brought to the station without putting up any resistance. It is understood that 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 gardaí have been attempting to learn more about his time in the UK.
Gardaí believe there is a chance that the assailant and Det-Gda Horkan were known to each other as the late officer was well-known in Castlerea.
However, Garda Commissioner Drew Harris said that the incident was "random" and not linked to any organised crime element or subversive cause.