A New Orleans man, accused of firing at Jefferson Parish sheriff’s deputies and a federal agent before he himself was shot during a drug raid on his 7th Ward house last year, pleaded guilty in federal court Monday to drug and gun offenses.

Stephen Ellis, 53, pleaded guilty to being a felon in possession of a firearm, possession of a firearm in furtherance of a drug trafficking crime and possession with intent to distribute cocaine.

He faces a maximum 30-year prison sentence on the last offense, thanks to prior drug-trafficking convictions.

U.S. District Judge Susie Morgan set Ellis’ sentencing for July 13.

Ellis initially was booked on eight state counts of attempted first-degree murder, one for every officer nearby when he fired at least one shot during an early-morning attempt by officers to breach the front door of his Pauger Street house on Feb. 26, 2015.

The officers responded with dozens of shots that tore through the front and side of the house, shredding the walls, ceiling and appliances. Ellis was hit in the leg. None of the law enforcement agents was hit.

The return fire came from two Jefferson Parish deputies and a U.S. Immigrations and Customs Enforcement agent, authorities said. They were among several members of a federal drug task force who were there, backed by New Orleans police officers, to execute a search warrant based on information from a confidential informant that Ellis was selling drugs out of his house.

Ellis admitted that authorities recovered 14.5 ounces of cocaine, an ounce of marijuana, four firearms and more than $500 in searches following the gunfire.

Ellis’ wife, Leona, said last year that the officers never announced themselves as law enforcement before they started bashing in the front door of the small house two blocks on the lake side of North Claiborne Avenue.

“Nobody heard nothing,” she said then. “Even after shots was fired, we still didn’t hear, ‘We the police!’ ”

Col. John Fortunato, a spokesman for the Jefferson Parish Sheriff’s Office, insisted last year that the deputies announced themselves while trying to breach a tightly secured front door.

Orleans Parish District Attorney Leon Cannizzaro’s office dropped all charges against Ellis in May upon his indictment in federal court, records show.

Ellis has several prior state drug and firearms convictions in Orleans Parish dating back to 1998.

Follow John Simerman on Twitter, @johnsimerman.