Legal protection was mandatory already in medieval Swedish law .
Gustav I of Sweden began strictly enforcing this provision , applying it even when work was potentially available .
Legal protection was mandatory already in medieval Swedish law , but Gustav I of Sweden began strictly enforcing this provision , applying it even when work was potentially available .