A record number of revelers flocked downtown last Sunday for New Haven’s 170th annual St. Patrick’s Day Parade, and police cracked down on public drinking along the route.

New Haven Police Department officers arrested 40 people during the day’s festivities for offenses including minor assaults, fighting, vandalism, public drinking and disorderly behavior, department spokesman David Hartman said. Those numbers, which Hartman said were comparable to past parades, came after repeated warnings from police and city officials that open container laws would be enforced and unruly behavior would not be tolerated.

“The crowd along the parade was generally well-behaved, as expected, but those in the downtown bar areas were generally not well-behaved,” he said. “We were pleased that in the wake of increased enforcement of laws prohibiting the public consumption of alcohol, there was a very noticeable increase in the number of younger children who lined the parade route with their families.”

The policing of the event did not deter parade-goers from turning out in high numbers to enjoy the occasion. While Hartman said the parade “absolutely did not” draw the 300,000 people expected by Grand Marshal Kevin Smith, it was the most well-attended parade he has seen.

“A sensible estimate of those revelers in the heart of the downtown entertainment district would be more than 20,000 but fewer than 35,000 at any one time,” Hartman said.

The weather may have helped boost the parade’s attendance. Revelers enjoyed sunny 51-degree weather as they wound from the intersection of Derby Avenue and Chapel Street to the New Haven Green.

With the increased crowds came a slight increase in the number of people arrested. In 2010, 26 people were arrested during the festivities, while “about three dozen” were arrested at last year’s parade, according to then-NHPD spokesman Joe Avery.

At this year’s parade, 11 people were arrested for breach of the peace, eight for interfering with police officers, five for disorderly conduct, four for assault and 12 for other offenses, Hartman said.

Those arrests came after police and city officials held a press conference at Whitney Avenue bar Anna Liffey’s on March 8, stressing that the NHPD would be vigorously enforcing public drinking laws at the parade and issuing a $99 fine to offenders.

The police have stepped up enforcement of the state’s open container laws in the past two years, Hartman said, adding that the measures helped make the event more family-friendly.

Among the Elm City officials marching in the parade were Mayor John DeStefano Jr., NHPD Chief Dean Esserman and New Haven Fire Department Chief Michael Grant.

State politicians also appeared in the line-up: U.S. Sen. Richard Blumenthal LAW ’73 marched alongside U.S. Rep. Chris Murphy, a candidate to replace Sen. Joseph Lieberman ’64 LAW ’67 after he retires at the end of his term this year.

The parade was slated to feature 3,600 marchers in 126 units, according to Smith.