A man accused of shooting his ex-wife and seven others dead in a California hair salon told police he contemplated the killings while sitting on a beach after a quarrel with his former spouse, court documents showed.

A search warrant affidavit seen on Wednesday offered chilling insights into events leading up to and including the October shooting spree in the quiet, Southern California town of Seal Beach, the worst mass murder ever in Orange County.

The suspect, Scott Evans Dekraai, 42, argued over the telephone with his ex-wife, Michelle Fournier, 48, hours before the shooting, then armed himself with three handguns and extra ammunition and strapped on a bullet-proof vest, according to the warrant, used to search his property after his arrest.

Dekraai then drove to Bolsa Chica State Beach, the warrant said. When Dekraai got to the beach, he got out of the vehicle, sat on the beach and pondered shooting his wife.

He later drove to the Salon Meritage along California's famed Pacific Coast Highway, where he is accused of opening fire on his former spouse and other employees and customers.

Dekraai immediately walked up to Fournier and shot her multiple times, the warrant said. Dekraai then shot a second female client who he knew as 'Christy.' Dekraai stated that 'Christy' had recently testified against him in a child custody dispute.

Christy Lynn Wilson, 47, was among the eight people killed in the attack.

Dekraai then stated that the male owner of the shop, 62-year-old Randy Lee Fannin, ran up to him armed with scissors, so Dekraai shot him at the front door, the search warrant said.

In addition to the eight people who perished, 73-year-old Harriet Stretz survived bullet wounds she suffered in the shooting after spending five days in the hospital in critical condition.

Witnesses say Stretz was in a chair having her hair coiffed by her 46-year-old daughter, hairstylist Laura Lee Elody, when the shooting started. Elody was among the dead.

Witnesses told police that Dekraai had visited the hair salon several times to argue with his ex-wife about custody issues, according to the affidavit.

Dekraai told police that his 8-year-old son with Fournier, Dominic, would sometimes come home with bruises on his body, the search warrant said. Dekraai would document the bruises in photographs.

Police seized photographs of apparent child injuries in Dekraai's house, according to the affidavit.

Dekraai and his ex-wife had been battling over custody of their son days before the rampage, and had appeared in court five days earlier. Dekraai was seeking sole custody, but a court report recommended against that.

The boy had been waiting in the principal's office at his elementary school for his mother or father to pick him up when the shooting occurred, authorities said.