A surgical instrument includes a housing and an elongated shaft extending distally therefrom. The elongated shaft includes a proximal portion, a distal portion and a flexible portion supported therebetween. The flexible portion permits pivotal movement of the distal portion of the elongated shaft and an end effector supported thereon. A locking mechanism is operatively associated with the flexible portion of the elongated shaft to selectively impede pivotal motion of the distal portion. The locking mechanism includes a fluid chamber defined within the flexible portion in which a variable viscosity fluid disposed. The variable viscosity fluid is responsive to the application of an electromagnetic field to exhibit increased rigidity in the presence of the electromagnetic field and reduced rigidity in the absence of the electromagnetic field. An electrical coil is arranged such that the electromagnetic field may be selectively induced by the delivery of electrical energy from a power source.