What tool is this?

I'm trying to remove the crankset on an old Raleigh Max but I have no idea what kind of tool I need to remove this:

It looks like it would need a spanner but then there's a screw thread around the outside
«1

Comments