SYRACUSE, N.Y. -- It was the first time Ryan Lawrence publicly admitted, to confessing to killing his daughter, 21-month-old Maddox Lawrence earlier this year.

However, was that confession legally obtained by a Syracuse Police detective? 

Lawrence's attorney says he has his doubts.

"There is a serious question here about the issue of his right to council and his constitutional right to have his counsel present when he was questioned," said Michael Vavonese.

Ryan Lawrence is charged with first-degree murder for the death of the 21-month old toddler back in February. Police believe he killed his daughter in Cortland County, and then took her body to the Syracuse Inner Harbor to dump it in the water

At a hearing Wednesday, the focus was on what Lawrence said to officials after he was taken into custody. Lawrence took the stand and testified that he wanted to stop talking to police hours into the interrogation.

However, Detective Mark Russin from the Syracuse Police Department says otherwise. Russin testified Lawrence was engaged the entire time and was even willing to bring authorities to the spot he allegedly killed Maddox and then where he disposed of her body

"I think any evidence we have is always important. and so it's routine any time a defendant gives a confession for the defense to put it to the test," said Jeremy Cali, Onondaga County Assistant District Attorney.

Several law enforcement officers also took the stand.

Baldwinsville Police Chief Michael Lefancheck testified that Lawrence gave investigators a fake name and date of birth, before removing his disguise and revealing his identity.

Lawrence also allegedly told a Syracuse police detective he had given her to another couple, to take her out of the country. Investigators say Lawrence later admitted he made that story up.

Officers that testified about their initial investigation all said their top priority was finding baby Maddox..

That decision on whether Lawrence's confession to police can be used at trial is now in the hands of a judge. We're told he'll make that decision on August 19th.

Maddox's mother Morgan Lawrence was in court Wednesday for the hearing. At times, she and her family became upset as details about Maddox's murder was discussed.

Ryan Lawrence's trial is scheduled to begin this October.