A method for providing stabilization and compression of a bone fracture, the method comprising:providing an intramedullary prosthesis sized for insertion into the intramedullary canal of a bone and having a distal end, a proximal end and a porous structure therebetween, wherein (i) in a first state, the prosthesis is longitudinally expanded and radially contracted, and (ii) in a second state, the prosthesis is longitudinally contracted and radially expanded, conforms to the shape of the adjacent bone and exerts forces on the adjacent bone; andpositioning the intramedullary prosthesis within the intramedullary canal of a bone so that the intramedullary prosthesis spans the bone fracture, whereby to provide stabilization and compression of the bone fracture.