Los Angeles police say a courthouse security officer wounded the man, who was wielding the weapon Tuesday afternoon in front of the court on First Street.
The man was shot in the hand and is expected to survive.
No one else was injured.
Details of the confrontation weren't immediately released.
The FBI will investigate the shooting since it occurred on federal property.
Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.