Superior gluteal artery
The superior gluteal artery is the largest and final branch of the internal iliac artery. It is the continuation of the posterior division of that vessel. It is a short artery which runs backward between the lumbosacral trunk and the first sacral nerve. It divides into a superficial and a deep branch after passing out of the pelvis above the upper border of the piriformis muscle. Within the pelvis, it gives off branches to the iliacus, piriformis, and obturator internus muscles. Just previous to exiting the pelvic cavity, it also gives off a nutrient artery which enters  the ilium. Structure. The superior gluteal artery is the largest and final branch of the internal iliac artery. It branches from the posterior division of the internal iliac artery. It exits the pelvis through the greater sciatic foramen. It divides into a superficial and a deep branch. Superficial branch. The superficial branch passes over the piriformis muscle. It enters the deep surface of the gluteus maximus muscle, and divides into numerous branches. Some branches supply the muscle and anastomose with the inferior gluteal artery, while others perforate its tendinous origin, and supply the integument covering the posterior surface of the  sacrum, anastomosing with the posterior branches of the lateral sacral arteries. Deep branch. The deep branch lies under the gluteus medius and almost immediately subdivides into the superior and inferior divisions. The superior division continues the original course of the vessel, passing along the upper border of the gluteus minimus to the anterior superior spine of the ilium (ASIS), anastomosing with the deep iliac circumflex artery and the ascending branch of the lateral femoral circumflex artery. The inferior division crosses the gluteus minimus obliquely to the greater trochanter, distributing branches to the gluteal muscles and anastomoses with the lateral femoral  circumflex artery. Some branches pierce the gluteus minimus and supply the hip-joint. Function. The superior gluteal artery takes part in the trochanteric anastomoses, forming a connection between internal iliac and femoral artery.