The inferior gluteal nerve is a branch off the sacral plexus. Its short path is primarily for innervation of the gluteus maximus muscle. The composition of this nerve is from the dorsal branches of the ventral rami of the fifth lumbar and first two sacral nerves.  It courses inferiorly and medially before exiting the pelvic cavity via the greater sciatic notch. After exiting the notch, the inferior gluteal nerve passes inferior to the piriformis muscle belly before dividing into several muscular branches supplying the gluteus maximus. 
The inferior gluteal nerve is a motor never responsible for the action of the gluteus maximus muscle. The muscle is primarily responsible for the extension of the trunk from a forward bending position and extension of the hip from sitting to standing and during stair climbing.  Some evidence has shown that the gluteus maximus muscle plays a more important role in running than in walking, creating an argument that humans evolved to run. 
The inferior gluteal nerve is part of the peripheral nervous system and formed by the neural crest cells. During, the early vertebrate development the neural crest cells develop in between the neural plate and non-neural ectoderm. The neural plate will eventually become the central nervous system, the ectoderm will become the epidermis, leaving the neural crest to contribute to the peripheral nervous system.  This nerve is a component of the sacral plexus and carries divisions of the fifth lumbar through the second sacral.
The inferior gluteal artery, a branch of the internal iliac, accompanies the inferior gluteal nerve as it innervated the gluteus maximus. The superior and inferior gluteal lymph nodes supply the gluteal region of the pelvis. This superior and inferior gluteal lymph nodes are parietal progressions of the internal iliac lymph vessels. 
Other nerves that originate from the same plexus are; superior gluteal nerve, inferior gluteal nerve, common fibular, tibial, posterior femoral cutaneous, pudendal, and sciatic. The sciatic nerve is the largest nerve out of these and will have multiple branches before its termination. The sciatic nerve shadows not only the other nerves in terms of size but also pathology.
The inferior gluteal nerve innervates the gluteus maximus muscle. This muscle is primarily responsible for hip, torso extension, and returning from a squat position. The gluteus maximus muscle has a broad base origin from the posterior surface of the iliac crest down to the lateral border of the coccyx with fascial insertion onto the sacral multifidus and gluteus medius and inserts itself into the gluteal tuberosity of the femur and portions of the iliotibial fascia. Bartlett and colleagues examined the gluteus maximus muscle during different active movements and found that sprinting far superseded climbing, walking, and running. They compared this muscular pattern to that of apes and found that among different insertional patterns we had more gluteus maximus activation during sprinting suggesting an evolutionary adaptation. 
Some studies have examined variations in the course of the inferior gluteal nerve. Tillman found in 112 subjects 17 had the inferior gluteal nerve pass through the piriformis similar to the variations seen with the sciatic nerve, they observed it that this variation was more common in men.  In a rare case from Sumalatha et al., the inferior gluteal nerve was absent and a division of the common peroneal nerve innervated the gluteus maximus. Although most anatomy textbooks will show the inferior gluteal nerve passing below the piriformis in approximately 0.2% to 4.4% of the adult population, the inferior gluteal nerve will pass superiorly to the piriformis. 
Total Hip Arthroplasty (THA)
One of the most common surgical approaches preferred by total joint replacement surgeons is the posterolateral approach. This dissection does not utilize a true internervous plane. The intermuscular interval involves blunt dissection of the gluteus maximus fibers proximally and sharp incision of the fascia lata distally. The deep dissection involves meticulous dissection of the short external rotators and the hip joint capsule. Care is taken to protect these structures as they are later repaired back to the proximal femur via trans-osseous tunnels. 
Peripheral nerve injury in THA
Multiple studies have been reported regarding the incidence rates and overall risk of peripheral nerve injuries during the most common THA approaches. The incidence rates reported vary widely in the literature. Reports dating back to the 1980s and 1990s cited up to an 8% incidence rate in THA patients.  More contemporary studies report a 0.6% to 3.7% risk of nerve injury in THA patients, with the incidence rate at least doubled in the revision setting . The latter has been well documented in the literature dating back to the early 1970s. 
Inferior gluteal nerve considerations
While most literature reports focus injury to the sciatic, femoral, obturator, superior gluteal and lateral femoral cutaneous nerves, much less attention is given to the inferior gluteal nerve. In addition, the exact clinical outcome "definition" varies greatly from study to study, and with the majority of nerve injuries, fortunately, being mild in nature (i.e. mild neuropraxia), the postoperative clinical examination likely underestimates the true incidence of neurologic injuries following THA. This is particularly true in the case of the inferior gluteal nerve.
Multiple cadaveric studies have documented the anatomy and course of the inferior gluteal nerve with respect to its anatomic susceptibility during the posterolateral approach to the hip. Apaydin et al. used 36 cadavers to develop a triangular landmark for the inferior gluteal nerve, this region included: posterior inferior iliac spine, ischial tuberosity, and greater trochanter. 
Other technical considerations
While many authors support the utilization of minimal invasive THA techniques, the potential benefits of these procedures can only truly brought into clinical fruitiion with superior knowledge of nerve anatomy, as trading the benefits of superior visualization during these procedures can potentially be offset by an increased risk of iatrogenic neurovascular injuries.
Techniques to reduce the likelihood of nerve compromise are achievable, one way is through a more minimally invasive total hip arthroplasty, where the surgeon does not dissect the gluteus maximus tendon and removes less tissue significantly reducing nerve compromise.  That being said, superior knowledge of the course of the nerve must first be mastered as
Marcy et al. describe a different approach to the hip, they do not split the gluteus maximus they only retracted the muscle backward with little damage to the nerve, this technique, however, has its disadvantages, high mobilization of the muscles and labor intensive.  With this in consideration, the more preferred approach is to split the gluteus maximus muscles. The incision must be 5mm or less from the tip of the greater trochanter and extend approximately 10 cm along the iliotibial tract, this route will protect the inferior gluteal nerve.
The sciatic nerve is typically the focus in piriformis syndrome, but any structure passing through the infrapiriform foramen can be compromised, including the inferior gluteal nerve. inferior gluteal nerve entrapment will have primary signs of gluteus maximus atrophy.  Seddon and Sunderland classification to peripheral nerve compromise is a valuable tool to use when testing a neurological injury. Seddon and Sunderland create five main classes of nerve compromise; neurapraxia, axonotmesis I-III, and neurotmesis. During neurapraxia focal demyelination occurs, this is the least severe state and usually has the best chance of full recovery. Axonotmesis is a more progressive stage of nerve injury and will involve the axon. Progression from axonotmesis grade I to III will involve the surrounding endoneurium and perineurium, this stage can heal, but is less likely. Neurotmesis is the most severe stage, this stage typically involves complete transection and is typically the stage post-surgical compromise, most of these conditions do not fully heal without surgical correction.  The preferred treatment for these issues is an end-to-end repair of the severed nerve. Kretschmer et al. reported good recovery in 70% post-surgical repair of iatrogenic nerve damage. 
Perisacral surgical techniques offer a different difficulty. During perisacral surgery to remove tumors, the surgeon must have clear landmarks developed or they risk cutting the superior and or inferior gluteal artery. The sacrospinous and sacrotuberous ligament are landmarks that the surgeon must identify because these two ligaments lie over the superior and inferior gluteal artery. Historical surgical techniques removed more gluteus tissue which made identification of the arteries easier, but also compromised functional recovery because of tissue loss.