Sanjeev Chada has been arrested on suspicion of the murders of his two sons.
The bodies of ten-year-old Eoghan and five-year-old Ruairi were found in the boot of a crashed car in Co Mayo on Monday afternoon.
Mr Chada, 43, was being treated at Mayo General Hospital for injuries he received when his car hit a wall outside Westport.
He was detained following his discharge from hospital earlier today.
Mr Chada is being questioned by gardaí in Westport and can be held for up to 24 hours.
The boys' remains were brought back to Co Carlow this evening.
The single hearse left Mayo General Hospital just before 9pm and was accompanied by local gardaí on the way out of Castlebar.
Eoghan and Ruairi will be buried following funeral mass at 1pm in St Lazarian's Church, Ballinkillen on Friday.
Bagenalstown parish priest Fr Declan Foley said the community is extremely traumatised by the deaths of the two boys.
He said it is particularly hard for their classmates in the local school and it hard for their parents to explain what has happened to them.
Fr Foley said a plan of action has been put in place to help those parents to support their children through this difficult time.
Meanwhile, gardaí have appealed to the business community, particularly owners of service stations and fast food outlets, to review CCTV footage which may assist the investigation.
Officers are seeking to trace the movements of a dark green Ford Focus car, registration number 06 CW 238, between the hours of 6.30pm on Sunday 28 July and 3.30pm on Monday 29 July.