SANTA ANA -- A disgruntled father embroiled in a custody dispute with his ex-wife pleaded guilty Friday to murdering her and seven others in a shooting rampage at a California hair salon.

Scott Dekraai, a 44-year-old former tugboat operator, looked straight at the judge as he entered his pleas to eight counts of murder and one count of attempted murder with special circumstances and enhancements in a courtroom packed with the tearful relatives of his victims.

"After today you will not be an alleged killer anymore, you are going to be a convicted murderer," Judge Thomas M. Goethals told Dekraai.

Prosecutors are seeking the death penalty for Dekraai, who had been locked in a bitter custody dispute with ex-wife Michelle Fournier over their 8-year-old son when he entered Salon Meritage in Seal Beach in October 2011 wearing a bulletproof vest and armed with three weapons.

Dekraai shot and killed Fournier before turning his guns on the salon owner, stylists and customers. On his way out, he killed a man who was sitting in his car in the parking lot. Police arrested Dekraai within minutes of the rampage, which left eight dead and one wounded.

"'I know what I did,'" he told an arresting officer, according to a police affidavit.