This pin is a graduation badge of a commander of the Workers Militia in Hungary.
The Workers Militia was a paramilitairy organization in Hungary from 1956 to 1989. Their aim was to defend the means of production and was a voluntairy service.
Starting with 20,000 members, it gradually developed into a large armed force (60,000 strong), although they were never deployed.
In 1989 a majority of the people spoke out in a referendum with 94% against the militia. After this referendum the militia was dismantled.