A Montreal man who pleaded guilty just 12 days ago to fatally stabbing his unborn child told a Quebec Superior Court justice on Tuesday that he now wants to withdraw his plea.

That was one of the comments from Sofiane Ghazi as he informed a Montreal court he'd fired the lawyers who represented him throughout the case, alleging they hadn't properly informed him of his rights.

For their part, the defence attorneys told the court they'd planned to present a motion seeking to withdraw from the case themselves had Ghazi not dismissed them.

The move caught both the Crown and Quebec Superior Court Justice Jean-Francois Buffoni by surprise during what was supposed to be Ghazi's sentencing hearing.

The judge announced a postponement until Oct. 8 to allow Ghazi to find a new attorney and discuss the matter.

Ghazi, 39, suddenly pleaded guilty on Sept. 5 -- the second day of his trial -- to reduced charges of the second-degree murder of the infant boy and the aggravated assault against his wife. He had initially gone to trial on first-degree murder and attempted murder charges.

Second-degree murder comes with an automatic life sentence, with the only issue to be settled being how much time must be served before being eligible for parole. The minimum by law is 10 years.

In an agreed statement of facts, Ghazi admitted to stabbing his wife 19 times with a carving fork -- 12 times on the left side of her stomach and seven times in the upper left thigh.

Of those, nine wounds were inflicted on the baby in the womb and observed on the newborn after his birth.

Ghazi's now ex-wife survived the July 24, 2017, attack after being rushed to hospital, and the child, who in court was referred to only as Baby Ghazi, was delivered by emergency C-section.

After the birth, the baby had a heartbeat for several minutes before succumbing to his injuries.

The boy's cause of death was attributed to trauma caused by a sharp object "in utero," but Ghazi told the court he accepted the fact that "the death of Baby Ghazi occurred after he'd become a human being."

According to the Criminal Code, a child is considered a human being "when it has completely proceeded, in a living state, from the body of its mother," whether or not it has breathed, has independent circulation or has had its umbilical cord cut.

At the time of the attack, the couple had been married for 12 years, and the woman was 36 weeks pregnant. Both her identity and that of the couple's two other children are protected by a court-ordered publication ban.

The court heard Ghazi was a consumer of hard drugs and that one month earlier, he had been granted bail on a number of conditions, including that he follow addiction therapy and not be present at his wife's home without her consent.

On July 23, 2017, the woman, believing Ghazi had been taking drugs, ordered him from their apartment. He refused and she called 911, which led him to leave angrily before police arrived. He returned several hours later in a rage before stabbing her repeatedly, according to the agreed statement of facts.

 At the end of Tuesday's hearing, which lasted less than 10 minutes, Ghazi seemed unclear on what was happening.

"Are my pleas withdrawn?" Ghazi asked.

"Absolutely not," Buffoni replied.

Prosecutor Louis Bouthillier told reporters outside the courtroom there are precedents for such actions but added the law is quite settled on the issue.

"It's something that he mentioned (withdrawing plea) but he hasn't been able to speak with counsel yet, so we will wait for him to retain and instruct counsel before further commenting on the issue," Bouthillier said.

He added Ghazi's decision to oust his lawyers was unexpected and neither the Crown or the judge were given any warning, noting the delay between the plea and Tuesday's would-be sentencing.

"Who knows what happened during the meantime," he said.