Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Scattered outbreaks of resistance flared as an overnight curfew settled over Baltimore, but they were largely quelled within an hour Tuesday night as thousands of local, state and federal law enforcement officers blanketed the city.

Shortly before midnight, Police Commissioner Anthony Batts reported 10 arrests, most of them for simple curfew violations.

"The curfew is, in fact, working," he said. "I'm very pleased with the community, with the citizens, with the residents."

Authorities had said they were confident they would prevent a repeat of Monday night's rioting and looting, and except for the handful of flare-ups, they appeared to be succeeding.

About 20 minutes after the 10 p.m. curfew went into effect, streets appeared to begin emptying as police slowly advanced in lines, projecting pepper balls — essentially pellets of pure hot pepper — at gathered crowds.

Shortly after 10:30 p.m., police began advancing on what they called a "group of criminals" who had started a fire outside a public library branch at Pennsylvania and North avenues, near where some people briefly threw items at officers. The fire was soon extinguished. At another location, a smaller group of protesters lay in the street in a display of civil disobedience.

By 11 p.m., only small groups of civilians, mainly journalists, remained on the streets.

The relative calm capped a day during which residents tossed bottles and bricks into trash bags rather than at police, beginning what authorities hoped would begin a week of peaceful cleaning up.

It was a stark transformation from Monday night, when dozens of cars were set on fire, 15 buildings were set ablaze, at least 20 officers were injured and 235 people were arrested in disturbances that followed a funeral for Freddie Gray, a black Baltimore man who died last week in police custody.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

RELATED: Baltimore Gang Members: We're Trying to Stop the Violence

"Today, I think we saw a lot more of what Baltimore's about. We saw people coming together to reclaim our city, to clean our city and to help heal our city," Mayor Stephanie Rawlings-Blake said Tuesday afternoon. "I think this can be our defining moment and not the darkest days that we saw yesterday."

Large crowds marched throughout the city ahead of the curfew, remaining peaceful. A marching band even showed up on one street to lead festivities.

"For the most part, the city has been calm today," Batts said Tuesday evening.

A man on a bicycle greets Maryland state troopers Tuesday in the aftermath of rioting Monday night. AP

"We saw what we're used to in Baltimore, and that's people coming together peacefully," Baltimore police Capt. Eric Kowalczyk told reporters later Tuesday night. He stressed that the curfew would be enforced, but he said, "We want people to see what Baltimore is, and it's a peaceful city."

Public schools, which were closed Monday and Tuesday, were scheduled to open on time Wednesday morning, the school district said.

"Despite that it came after days of rising tension, yesterday's violence felt like a shockwave across the city. But I am writing to tell you that it will not overwhelm us," Baltimore City Public Schools CEO Gregory Thornton said in a statement Tuesday.

And while the Baltimore Orioles planned to play Wednesday's game against the Chicago White Sox in the eerie silence of a closed Oriole Park, the team said Thursday's double-header would be open to the public.

RELATED: Orioles Executive Offers Perspective on 'Lives and Dreams Cut Short'

Philecia Tyrell, a social work student at the University of Maryland at Baltimore, told NBC News that images of violence didn't represent what was really happening in the city.

"The peaceful protests aren't being heard," Tyrell said. "I don't agree with the riots, but you're sending the wrong message when you only report something bad happens.

"This is a real issue," she said. "Although we don't like the riots, there is a reason for them, and the anger is real."

The National Guard arrived and Rawlings-Blake ordered the 10 p.m.-to-5 a.m. curfew for the next week after rioting flared following Gray's funeral Monday.

For Barry Simms, a lifelong Baltimore resident, the presence of National Guard troops in the city — for the first time since rioting following the assassination of the Rev. Martin Luther King Jr. in 1968 — was hard to take.

"I was 8 years old when that happened," Simms told NBC station WBAL. "That image has stayed with me, and now I'm back in my own neighborhood and the National Guard are back in the city."

"I've been trying to hold it together," Simms said. "It is pretty tough."

GALLERY: Baltimore Sees Pockets of Reistance After 'Defining Moment'

Tracy Jarrett of NBC News contributed to this report from Baltimore.