The techniques herein relate to a blowout preventer a tubular of a wellbore penetrating a subterranean formation. The blowout preventer includes a housing having a bore therethrough, a segment carrier positionable in the housing, and a piston. The segment carrier includes a carrier ring for receiving the tubular and a plurality of segments pivotally movable radially thereabout. The piston is operatively connectable to the plurality of segments and actuatable for moving the plurality of segments between a disengaged and an engaged position about the tubular.