Thomas Piccard, 55, lived across the Ohio River in Bridgeport, Ohio, The Intelligencer & Wheeling News Register reported. Police Chief Shawn Schwertfeger said he was with the force for a period of years before resigning.
Schwertfeger said Piccard fired more than 20 shots at the building, which houses federal courts and other offices, and was killed after a Wheeling police officer and a federal security officer returned fire. The police officer is on administrative leave.
The chief refused to speculate on a motive.
Witnesses said Piccard began shooting from a parking lot across the street at 2:43 p.m., the newspaper reported.
Three court officers were injured, apparently by breaking glass.
Residents were evacuated from the area around Piccard's trailer in Bridgeport while it was searched for possible booby traps. A law enforcement source told the Intelligencer the phrase "Abandon hope all ye that enter this place" was scrawled on the outside in Latin.
Wheeling resident Carla Webb Daniels told the Intelligencer she saw the shooter firing.
Daniels said the gunman was a white male standing between vehicles in the parking lot. She told the Intelligencer she saw the man put down an assault rifle and reload before shooting at the YMCA building.