Anatomy

A 32-year-old patient received a badly placed intramuscular injection to the posterior part of his gluteal region. The needle injured a motor nerve in the area. Later, he had great difficulty rising to a standing position from a seated position. Which muscle was most likely affected by the injury?