New York City marked the reopening of public schools with excitement and caution Monday, ready to test whether the success of partial in-person education last year will hold up against a highly contagious delta variant as classrooms run at full capacity for the first time in 18 months.

The nation’s largest school system welcomed nearly 1 million children back into buildings, with city officials and teachers alike attesting to safety protocols in place.

“What an amazing day this is,” said New York Mayor Bill de Blasio (D), who began the day at P.S. 25 in the Bronx, where confetti and balloons marked the first day back. “This is the day we have been waiting for.”

The opening of school was briefly marred early Monday as the online system for parents to confirm the health status of their children crashed under the pressure of hundreds of thousands of people attempting to use it at once. Instead, many students lined up under sunny skies to be checked in by staff.

U.S. Education Secretary Miguel Cardona, who has pushed a national return to in-person school, was also on hand, visiting a classroom in the Bronx’s P.S. 121 alongside New York Schools Chancellor Meisha Porter. They both played get-to-know-you games with kindergartners.

“I’m excited for these kids, and I’m excited for the families,” Cardona said. He added he would give the students an A+ for mask compliance.

It’s been a tumultuous year and a half for students across the country, many of whom fell behind in their studies and didn’t see their friends or teachers; for parents, who juggled work and care responsibilities amid a financial downturn; and for teachers, who struggled to reach students online and dealt with their own share of burnout and stress.

In-person classes were offered for much of last school year in New York City, and there was scant virus transmission traced to buildings. A large number of students opted for remote instruction anyway. This year, that’s not an option for most students.

Nonetheless, there were reports that some parents planned to keep their children home, not trusting the schools would be safe as the delta variant of the coronavirus rips across communities. Pediatric cases of the coronavirus are far higher this year than last, especially among those under age 12 who are not yet eligible for coronavirus vaccines.

The attendance rate on Monday was at 82.4 percent, according to preliminary figures, which are missing data from 350 schools. As is, the rate is a little higher than the 80.3 percent of total students who attended in person and remotely on the first day last year. It appears to be down, though, from the 90.1 percent recorded in 2019 and 89.5 percent in 2018.

An advocacy group called Parents for Responsive Equitable Safe Schools accused the city of ignoring safety concerns. “All the safety precautions that are supposed to be in place prior to our children entering the school buildings are still not there,” it said on Twitter.

De Blasio said families can confront their fears by vaccinating all who are eligible and said the experiences of school last year and over the summer showed it can be done safely. “I understand fear. Let’s not be governed by fear,” he said.

The city’s Department of Education put in place a range of measures after summer break to help prevent schools from turning into coronavirus hot spots, including regular testing for staff members and students, and mandatory vaccination for teachers and staff. Vaccines are also required for students ages 12 and up who take part in some sports or after-school activities.

Some have complained, however, that the city has dialed back its routine screening programs. Officials have promised to test 10 percent of unvaccinated students and staff every other week. That is less than was done last year, when the district tested 20 percent of students and staff weekly.

Still, many school districts are not running screening tests at all. A Washington Post survey of the 20 largest districts found that only four, including New York City, are doing so.

Michael Mulgrew, president of the United Federation of Teachers, said Monday had gone “phenomenally well.” He pointed to work over the summer to train thousands of teachers to implement coronavirus safety procedures in every school building.

On a tour of schools, he heard cheering and saw students greeted with balloons, red carpets and, in one case, a band. He said he was standing on the sidewalk when a teacher walked up to him and said: “Michael, we got this. We’ve been waiting for this.”

“I was somewhat optimistic going into today, but I am beyond over the moon,” he said. He added: “Me being optimistic is not normal.”

It’s been a roller-coaster ride for schools, both in New York and across the country. De Blasio and then-Gov. Andrew M. Cuomo (D) shut down public schools in March 2020 to contain the spread of the coronavirus. Schools reopened the following September, closed again in early November and reopened partially 10 days later. In January, New York leaders announced that individual schools could remain open with mitigation measures even if they surpassed a threshold of positive cases among their students and staff.

New York state has the third-largest death count in the country since the pandemic began, but its trends have improved amid greater vaccination uptake. The latest New York data shows 33 average daily deaths tied to covid-19, a 37 percent decrease from the past seven days, according to data collected by The Washington Post.

More than 67 percent of New York City residents have had at least one dose of a coronavirus vaccine, according to official data.

But vaccines are not yet authorized for children under age 12. A decision from the Food and Drug Administration on vaccines for children between 5 and 11 years old was expected this fall but is now likely to come out in early 2022 as the FDA in July requested more data from manufacturers.

Valerie Strauss contributed to this report.