SAN JOSE — A Friday night house party in East San Jose ended with the arrest of 42 people who allegedly rained down bottles and objects at officers and in one instance, tried to drag a patrolman into the backyard, police said.

A cavalry of more than 60 San Jose police officers, coupled with Santa Clara County sheriff’s deputies, eventually halted an hours-long standoff with the raucous partygoers.

Police were called about 10:50 p.m. to a home in the 3000 block of Patt Avenue after reports of gunfire. The first officers to arrive saw people jumping a fence into the backyard after they noticed the police presence, while others threw bottles and other objects at them. One officer was struck and, according to police, one of the partygoers “attempted to drag” another officer “to the rear of the residence,” but the officer broke away and retreated to a safe spot awaiting backup.

After the dozens of other officers and deputies arrived, several hours went by before authorities convinced the occupants to surrender as a sheriff’s department helicopter circled the property above, police said.

The 42 partygoers were arrested on suspicion of various offenses, including assault with a deadly weapon on a police officer. Those arrested were booked into Santa Clara County Jail and Juvenile Hall; others were issued citations at the house.

One officer was treated and released from the hospital for moderate injuries, and another injured officer got treatment at the scene. It did not appear that the officer who was nearly dragged was injured.

The police response accounted for a significant portion of the night’s patrol staff, which has thinned over the past four years as layoffs, resignations and early retirements have shrunk the number of sworn officers from approximately 1,400 in 2008 to its current level of about 1,050.

Patrol, the core function of a police force, has been depleted in San Jose. According to a Nov. 13 report from the chief’s office, the police department had 673 budgeted patrol positions but just 634 filled, and after accounting for 51 who are either on disability or modified duty, 583 officers are performing the role. Meeting that number required a significant reallocation of officers from other divisions.

Contact Robert Salonga at 408-920-5002. Follow him at Twitter.com/robertsalonga.