Johns Hopkins University will hold its fall semester entirely online for undergraduates, a reversal of plans and the latest sign of the turmoil caused by the coronavirus pandemic.

School officials strongly urged students not to return to Baltimore. They also acknowledged the change of plans — coming just weeks before classes resume — would create a real hardship for many families and announced efforts to ease that burden.

The change was announced to campus Thursday evening with “a profound sense of regret and intense disappointment” by the school’s president, Ronald J. Daniels, and other university leaders.

University leaders announced undergraduate tuition would be discounted 10 percent for the fall semester. The Office of Financial Aid is planning for a “substantial increase” in student aid packages. The university also plans to provide emergency aid to students in need, as it did in the spring with the sudden switch to virtual instruction.

“We know that many of you have already secured off-campus housing for this fall, but we do not want that to dissuade you from protecting your own health and that of the community by staying home,” university leaders wrote.

Students who receive need-based financial aid for their off-campus housing and stay home this fall will continue to get that aid and other help with living expenses, the school announced. And students who don’t qualify for need-based aid but can demonstrate that costs associated with remaining at home for the semester has caused financial hardship can apply for help through the school.

The university is one of many to dramatically revise plans for the fall as conditions change. Georgetown University, which had planned to offer a mix of online and in-person classes, will now begin the year remotely. The University of Virginia said Tuesday that it would begin classes remotely, delaying in-person classes until after Labor Day. Catholic University in Northeast Washington said it would invite fewer students back to campus.

At the end of June, John Hopkins had announced plans to resume some in-person classes with limited classroom capacity, although most would still be held either virtually or in a hybrid format with some in-person and some remote work.

The university had resumed some operations, at low density, in labs and other settings. But with a second surge in coronavirus cases both in the region and elsewhere in the country, and with the greater challenges of undergraduate life — dorms, classrooms, and extracurriculars — school officials decided to pull back.

“At the end of June, the daily rate of new COVID infections in Baltimore was 10 per 100,000; now it is 28 per 100,000,” university leaders wrote to campus. “The infection is now particularly prevalent among young adults.”

And more than 30 percent of undergraduates live in states designated as covid-19 hot spots, they wrote.

“Obviously we were hoping if anything, it would go in the other direction,” said Tom Inglesby, director of the Center for Health Security of the Johns Hopkins Bloomberg School of Public Health.

Discussions about in-person classes included not only considerations of the safety of students, faculty and staff, but also of the neighbors in Baltimore, Inglesby said. Moving to all-virtual classes for undergraduates was disappointing, he said, but at the end of the day, it was just too much risk.

University officials pledged to offer engaging virtual classrooms and online versions of school traditions, and said they “stand ready to welcome everyone safely to Baltimore when public health conditions permit.”