A system for sanitizing an enclosed structure comprises a first sensor, a second sensor, a third sensor, a germicidal ultraviolet light source, a motor, and a controller. The first sensor detects the presence of humans or animals within the enclosed structure. The second sensor detects the position of at least one door of the enclosed structure. The third sensor detects tampering with the system. The ultraviolet light source provides electromagnetic radiation in the ultraviolet range. The motor moves the ultraviolet light source from an inactive position to an active position and from the active position to the inactive position. The controller receives inputs from the first sensor, the second sensor, and the third sensor, and transmits outputs to the ultraviolet light source and the motor. When the controller receives signals that no humans or animals are present in the enclosed structure and that the door is in a closed position, the controller transmits a signal to the motor to move the ultraviolet light source from the inactive position to the active position and a signal to activate the ultraviolet light source. If humans or animals are detected to be present in the enclosed structure or if the door is detected to be open, then the controller deactivates the ultraviolet light source and repositions the ultraviolet light source.