More than 1,000 students and staff members at two Los Angeles universities were quarantined on campus or sent home this week in one of the most sweeping efforts yet by public health authorities to contain the spread of measles in the US, where cases have reached a 25-year high.

By Friday afternoon, two days after Los Angeles county ordered the precautions, more than 325 of those affected had been cleared to return after proving their immunity to the disease, through either medical records or tests, school officials said.

The action at the University of California, Los Angeles, and California State University, Los Angeles, which together have more than 65,000 students, reflected the seriousness with which public health officials are taking the nation’s outbreak.

“Measles actually kills people. So we have to take that really seriously,” said Dr Armand Dorian, chief medical officer at the University of Southern California’s Verdugo Hills hospital.

Cal State-LA reported 875 students, staff, faculty and visitors were placed under quarantine after possibly being exposed to measles this month. About 250 had been cleared by Friday after proving they are immune to the disease.

At UCLA, 129 students and faculty were quarantined. All but 46 had been cleared by Friday.

The affected people were singled out based on their possible exposure to either an infected UCLA student who had attended classes in two buildings on three days earlier this month, or a person with measles who visited a Cal State-LA library on 11 April, officials said.

Those under the quarantine – one of the biggest in state history, the Los Angeles Times reported – were instructed to stay at home and avoid contact with others. They also were barred from traveling by public transportation, including planes, trains, buses or taxis. If they had to travel for an emergency, they were told to notify public health officials first.

“This is a legally binding order,” the county’s public health director, Dr Barbara Ferrer, told reporters.

Anyone who violated it could be prosecuted, she said, but she added that it appeared everyone is cooperating so far.

“We have arranged for those who live on campus to be cared for at UCLA while they are quarantined,” the UCLA chancellor, Gene Block, said in a statement on Wednesday. “Please be assured that we have the resources we need for prevention and treatment, and that we are working very closely with local public health officials on the matter.”

Several students at Cal State-LA were shocked that their campus could be hit by a measles outbreak.

“When they were like measles, I was like, ‘What? Where did that come from,’” said Sergio Dula, a communications major.

Eden Guerra, a kinesiology major, was surprised classes weren’t canceled, noting, “This is like serious, like it’s life, you know.”

The quarantine comes as the number of measles cases in the US this year hit a quarter-century high, despite being declared all but eliminated from the country in 2000. Colleges and universities are an area of concern for public health officials, the Los Angeles Times reported, because the current generation of college students were infants when Andrew Wakefield, the disgraced former British physician, began spreading the false idea that vaccines were linked to autism.

The so-called “Wakefield generation” has lower rates of vaccination than other age groups, the Times reported.

A small outbreak of measles is occurring in Los Angeles county involving five confirmed cases linked to overseas travel.

State health officials say the number of measles cases is up in California this year and much of the increase is linked to overseas travel.

Dr Karen Smith, director of the California department of public health, says the state recorded 38 measles cases as of Thursday, versus 11 around the same time last year.

She says the state typically sees fewer than two dozen cases a year.

This year, California’s cases stretch across 11 counties and affect patients from five months to 55 years of age.

She says more than 76% of patients were not vaccinated or did not receive the recommended two doses of vaccine.

Fourteen of those infected had traveled overseas to countries including Philippines, Thailand, India and Ukraine.

Measles symptoms include high fever, a cough and a rash.