Los Angeles, the second largest school district in the United States, shut down all of its schools on Tuesday after officials reported receiving an unspecified threat and ordered a search of all schools.

Officials asked parents to keep all of the system's 643,000 students at home to allow time for a full search of more than 1,200 schools, from primary through high schools. It was the first closure of the full district in at least a decade, officials said, and appeared to be unprecedented in scale.

Students who were already at school were sent home, officials said.

The threat came less than two weeks after a married couple inspired by Islamic State militants shot dead 14 people in San Bernardino, California, about 60 miles (100 km) east of Los Angeles.

The school district regularly receives threats, but this one stood out for its scale, schools Superintendent Ramon Cortines said.

"This is a rare threat ... It was not to one school, two schools or three schools, it was many schools," Cortines told reporters at a press conference that began shortly before schools were to begin opening.

"I am not taking the chance of taking children any place into the building until I know it's safe."

Los Angeles police and the FBI were notified of the threat and were investigating, officials said.

The threat came via an electronic message and mentioned backpacks and other packages, Cortines said.

The threat was delivered to a school board member, the Los Angeles Times reported.

Officials said they were not aware of any other threats to schools outside the district, adding that they would issue additional details on the threat later in the day.

The San Bernardino attack and other recent mass shootings have pushed militant Islam and gun violence to the forefront of the U.S. presidential campaign.

The United States has suffered repeated deadly attacks in schools in recent years, typically carried out by gunmen. The deadliest attack in the past decade occurred at Virginia Tech, where a shooter killed 32 people. The second deadliest was the 2012 massacre at Sandy Hook Elementary School in Newtown, Connecticut, which left 20 young children and six educators dead.