One worker died and another was injured Thursday when a temporary hoist fell off a building under construction in Somerville.

The accident happened at an administrative office building being built for Partners HealthCare. A spokeswoman for the contractor, Suffolk Construction Co., said the two workers were employed by subcontractors. Their names have not been released.

The spokeswoman said the injured worker is hospitalized in serious but stable condition. Suffolk Construction said the workers were installing external hoists on the building when a hoist cab fell away from the building.