WASHINGTON (Reuters) - A Pennsylvania man pleaded guilty on Tuesday to brandishing a gun near the White House in May before a Secret Service guard shot him, prosecutors said.

Jesse Olivieri, 31, of Ashland, Pennsylvania, entered the guilty plea in a Washington hospital, where he is being treated for his gunshot wound, the U.S. Attorney's Office said in a statement.

Olivieri went through a White House security gate on May 20 openly carrying a loaded .22-caliber handgun. A guard shot Olivieri once when he ignored repeated commands to stop and drop the weapon, the statement said.

Officers found ammunition, an empty holster and a canister of pepper spray in Olivieri's car, which was parked near the White House. A spent .22-caliber shell casing was found near the car.

Olivieri pleaded guilty to a federal charge of resisting officers with a dangerous weapon, the statement said. He faces a likely range of eight to 14 months in prison and a possible fine of up to $40,000. No sentencing date was set.

President Barack Obama was not at the White House when the incident occurred, but it prompted a lockdown of the complex.

(Reporting by Ian Simpson; Editing by Alan Crosby)