Greed, debt and a gambling problem drove a Southern California man to kill his business partner's family with a sledgehammer and bury their bodies in the desert, prosecutors said Monday.

But the defense said authorities are charging the wrong man and the real culprit is another business partner.

Opening arguments were held in the trial of Charles "Chase" Merritt.

Merritt, 61, has pleaded not guilty. If convicted, he could face the death penalty.

Sean Daugherty, supervising deputy district attorney for San Bernardino County, told jurors that Merritt wrote checks for more than $21,000 on his partner's online bookkeeping account after the family was last seen alive in February 2010, the Sun newspaper of San Bernardino reported.

"Greed, and greed's child, fraud" were the motive, Daugherty argued.

Merritt is charged with killing Joseph McStay; McStay's wife, Summer; and their 3- and 4-year-old sons. The family's disappearance perplexed investigators for years, with no signs of forced entry at their San Diego County home.

Three years later, their bodies were found more than 100 miles (160 kilometers) away in a remote area of San Bernardino County, along with a 3-pound (1.5-kilogram) sledgehammer and a child's pants and diaper.

Merritt made custom fountains for McStay's online water feature business and prosecutors and sheriff's investigators have said he was in debt and had a gambling problem, the Sun reported.

Merritt "desperately tried to cover his tracks after the murders . misled investigators, talked in circles, and played the victim," Daugherty said.

But Rajan Maline, Merritt's attorney, said prosecutors ignored a prime suspect: Another McStay business partner that Maline said stole $7,900 from McStay's account in the days after the family vanished.

"The only reason he did that is because he knew Joseph wasn't coming back," Maline said.

Authorities said that after the family disappeared, Merritt's cellphone was traced to the area near the gravesites and to a call seeking to close out McStay's QuickBooks account for his water features business.

But Maline argued that two other phone calls that placed Merritt away from the burial site weren't considered.

They also say Merritt's DNA was discovered on the steering wheel and gearshift of McStay's SUV, which was impounded near the Mexican border a few days after the family vanished.

Merritt's attorneys say McStay could have transferred the DNA to the vehicle after he met with Merritt shortly before the family vanished. They say none of Merritt's DNA was found at the gravesites but DNA belonging to other unidentified individuals turned up there.

The McStay family disappeared from their home in Fallbrook, which is about 50 miles (80 kilometers) north of San Diego.

Daugherty said three victims died of blunt-force trauma to the head and there were not enough remains of one of the boys to determine how he was killed, the newspaper reported.

Investigators spoke with Merritt shortly after the family went missing and noticed Merritt referred to them in the past tense, Daugherty said.