Authorities said the semiautomatic weapon that John Zawahri used in last week's fatal attacks was assembled from various parts, possibly to skirt California law.

The semiautomatic weapon used in the Santa Monica shooting rampage appears to have been put together from various parts, possibly in an attempt to circumvent the state's restrictions on such guns, law enforcement sources said Wednesday.

While certain types of AR-15-style rifles are banned in California, it's legal to purchase parts that can be used to assemble and customize the guns. Santa Monica police have said John Zawahri, 23, used an AR-15-style gun during the attack and was also carrying a .44-caliber handgun.

The sources, who spoke on the condition of anonymity because the case was ongoing, said detectives are still trying to figure out how the gun was put together and whether Zawahri obtained it whole or assembled it himself.

Zawahri killed five people last Friday in an attack that started at his father's home and ended at Santa Monica College, where police fatally wounded him in the school's library.

Sources said Wednesday that Zawahri fired about 100 rounds during the rampage, which lasted about 10 minutes. He fired at passing cars, a bus, pedestrians as well as police. Authorities have said he had access to more than 1,300 rounds of ammunition.

Santa Monica Police Department investigators, working with the Federal Bureau of Alcohol, Tobacco, Firearms and Explosives and the California Department of Justice, are now trying to trace where the parts came from.

Zawahri's rifle appeared to be modified so it could fire more rounds, the sources said. Police said he had 40 magazines capable of holding 30 rounds each during the rampage.

California outlaws the commerce of AR-15 weapons that have certain features, including a detachable magazine, which allows sustained firing. Other features include folding telescopic or detachable stocks or a threaded barrel.

Purchase, sale and transfer of high-capacity magazines is illegal, but currently possession of the items is not.

Experts say that buying a legal, already assembled AR-15, and then taking it apart and rebuilding it to custom specifications is common.

The concern, said Garen Wintemute, director of the UC Davis Violence Prevention Research Program, is that some people buy an unfinished AR-15 base receiver and then build out the weapon without ever registering it.

"People who really push the envelope on the law like to play with the question, 'How finished does that lower receiver have to be to be considered a firearm?' " he said. "There's a point at which it is just a block of steel."

Anti-gun advocates have been raising alarms about illegal weapons that were put together with legally obtainable parts.

The AR-15 rifle was the type of gun used by shooters in an Aurora, Colo., movie theater shooting and at Sandy Hook Elementary School in Newtown, Conn. It's unclear how exactly those rifles were modified.

In the wake of Newtown, the California Legislature is considering a string of new gun-control bills. One proposal would ban the possession of high-capacity magazines. Another would outlaw future sale, manufacture, transfer and possession of semiautomatic rifles that accept detachable magazines.

Police are trying to determine a motive for the violence. Sources have said Zawahri suffered from mental problems and struggled with the divorce of his parents.

In 2006, an English teacher at Olympic High School in Santa Monica said he saw Zawahri surfing the Internet for assault weapons. Alarmed, he sent Zawahri to the principal's office. Within days, the police were involved and Zawahri was admitted to UCLA's psychiatric ward.

Zawahri appeared to have planned out the attack, strapping ammunition to his body as well as in pouches in his clothing and a protective vest.

Authorities say Zawahri first killed his father, Samir, 55, and older brother, Christopher, 25, at their Santa Monica home before carjacking a motorist and forcing her at gunpoint to drive him to the campus.

Along the way he fired on other vehicles, including a sedan, a bus and a sport utility vehicle carrying Santa Monica College groundskeeper Carlos Franco, 68, and his daughter, Marcela, 26. Both died.

Police identified his last victim as Margarita Gomez, a 68-year-old visiting the campus to collect cans.