NEW ORLEANS — A Mandeville man will spend 35 years in prison without the benefit of parole after he pleaded guilty to shooting at police officers in a standoff last January.

District Judge Alan Zaunbrecher sentenced 41-year-old Cory C. McDonald Friday, District Attorney Warren Montgomery's Office said.

Authorities say McDonald attacked a woman and held her inside a Mandeville home until she was able to escape and call police on Jan. 19, 2018. St. Tammany Sheriff's Office deputies found McDonald armed with a shotgun barricaded inside a small shed in a backyard. 

During the standoff with deputies, prosecutors say McDonald fired twice at them, narrowly missing striking one deputy in the head. A SWAT team later entered the home and subdued McDonald as he fought them.

McDonald was sentenced to 35 years in prison for attempted first-degree murder, two years for second-degree battery, two years for false imprisonment, and two years for resisting an officer. Those sentences are to be served at the same time.