Senior Judicial Magistrate of Dhaka M Jasim Uddin recorded the confessional statements of Golam Mostafa and Azizul Bawani in the afternoon and sent them to jail, said sub-inspector Shah Alam of Demra Police Station.
In their statements, the youths told the court that they lured the two girls, both aged 4, into going to a nearby flat with lipsticks on Monday, Alam said.
They turned on the sound box before trying to rape the two girls apparently to die down their screaming.
After failing to violate the girls, the miscreants strangulated them to death as they thought they might fall in danger if the girls disclosed the matter, the SI said.
On Monday night, police recovered the bodies of Nursat, daughter of Palash, and Dola, daughter of Faridul -- from the ground floor of a seven-storey building on Shahjalal Road in Demra.
Police arrested Golam Mostafa from Bhanga Press area of Jatrabari on Tuesday afternoon.
Based on his statement, they picked up Azizul from Mollah Bridge area of Demra the same day.