A gunman who murdered a seven-year-old girl was caught because public outrage at her death compelled people to go to the police, a court heard.
Toni-Ann had been visiting Mr Byfield when they were shot
Joel Smith, 32, of no fixed address, denies murdering Toni-Ann and Bertram Byfield, the man she knew as her father, in north-west London, in 2003.
The prosecution claims he left no clues but told others what he had done.
Mr Smith was described in court as a "self-confessed gunman and robber of drug dealers".
Toni-Ann, who was raised in Jamaica, had been in the care of Birmingham Social Services when she died.
She was placed with a foster family, but while they were on holiday Toni-Ann was allowed to stay with a girlfriend of Mr Byfield, himself a convicted drug dealer.
The court heard he had continued to deal cocaine up until his death, was likely to have dealt with "highly unpleasant characters" and had been shot once the year before.
On Saturday 13 September 2003 the pair had been out shopping for Toni-Ann's new school uniform.
They returned to Mr Byfield's bedsit in a hostel for ex-offenders in Kensal Green late that night. Shortly after midnight, both were shot dead.
The prosecution said the killer may have been trying to rob Mr Byfield, or may have gone there to shoot him. They said Toni-Ann was shot in the back to eliminate her as a witness.
Prosecutor Richard Horwell said Mr Smith must have thought he had left no trace.
"There had been no witnesses, he had been able to escape from the scene without incident, there were no CCTV cameras to capture him entering or leaving," he told jurors.
But the killing of Toni-Ann compelled previous friends and acquaintances of Mr Smith to identify him to police as the gunman, Mr Horwell said.
"These crimes had shocked the nation and we suggest the notoriety was such that the normal barriers which exist between some individuals and the police had collapsed."
Jurors heard part of the case against Mr Smith would be confessions he allegedly made to friends and evidence from two former cellmates.
"It is the combination of guilt, a loose tongue and a misplaced trust in others that has placed this defendant in the dock." he said
The prosecution said Mr Smith told a friend in Liverpool: "I have blasted a Yardie and his girl."
In jail in Liverpool, he allegedly told his cellmate he had been hired for £25,000 to kill Mr Byfield.
And the court heard, after watching a BBC Crimewatch appeal to find Toni-Ann's killer, he said: "If they get me for this, I won't see the other side of the wall."
He was arrested in jail in October 2005 and told police he had been to the property earlier that evening to buy cannabis, but denied murder.
After their deaths, blood samples showed Mr Byfield was not the biological father of Toni-Ann.
But Mr Horwell told the court it was "an irrelevance" and he would continue to refer to them as father and daughter.
The trial continues.