Following Ethics Committee approval and informed patients consent, Ninety patients 20-60 yr old ASA physical status I or II, scheduled for femur surgery under spinal anesthesia, were studied in a prospective, double-blinded, randomized way. The patients were randomly allocated to one of three groups of 30 each. The magnesium group (groupM) received bupivacaine 15mg combined with 0.5ml magnesium 10%,the fentanyl group (group F) received bupivacaine 15mg combined with0.5 ml fentanyl[25microgram] and the placebo group (group P) received bupivacaine 15mg combined with 0.5ml distilled water intrathecally . Time to first requirement of analgesic supplement, Sensory block onset time, maximum sensory level , onset of motor block, duration of blockade, hemodynamics variables, the incidence of hypotension, ephedrine requirements, bradycardia ,hypoxemia [Saturation of peripheral oxygen (SpO2)<90], postoperative analgesic requirements and Adverse events, such as sedation, dizziness , Pruritus and postoperative nausea and vomiting were recorded. Patients were instructed preoperatively in the use of the verbal rating scale (VRS) from 0 to 10 (0no pain, 10maximum imaginable pain) for pain assessment. If the VRS exceeded four and the patient requested a supplement analgesic, methadon5 mg intravenously , was to be given for post-operative pain relief as needed .