A man who is facing an attempted murder charge after a five-year-old Brampton boy was found with life-threatening injuries Thursday was out on bail for a separate attempted murder charge when the boy was hurt.

Peel Regional Police say 28-year-old Dyon Smart was arrested in September of 2017 and charged with attempted murder and aggravated assault after he allegedly attacked a 44-year-old man in the same area of Brampton where the boy was also found.

Smart, also a Brampton resident, appeared in court Friday morning in handcuffs. He was wearing a grey T-shirt and jeans and had scruffy hair and a beard.

The Crown sought his detention and he was remanded back into custody until another court appearance scheduled for July 25.

This memorial for an injured Brampton boy was erected near the train tracks where he was found Thursday. (Linda Ward/CBC)

Meanwhile, a memorial for the boy with teddy bears and candles has started to form near the railway tracks where he was found.

The boy’s mother first called police around 6 a.m. Thursday after she woke up to find her front door open and the child gone. Police were told the child was last seen at approximately 2 a.m.

There were no signs of forced entry into the house, according to police.

A police canine unit found the boy near train tracks close to his home, in the area of McHardy Crescent and McMurchy Avenue S., just before 7 a.m.

Peel police investigate the train tracks near where a 5-year-old Brampton boy was found injured on Thursday.(Paul Smith/CBC)

Police say the boy was found unconscious with life-threatening injuries.

Neighbours say they know Smart as “Pops,” and say he’s the mother’s boyfriend.

Paramedics took the boy to Brampton Civic Hospital. He was then transferred by Ornge air ambulance to Toronto’s Hospital for Sick Children in critical condition, according to paramedics spokesperson Brad Bowie.

Police say he is now in stable condition.

“In terms of how and where exactly this all took place, that’s still part of our investigation and we’re not speaking to that just yet,” said Const. Harinder Sohi.