BRUSSELS — For most Europeans, almost nothing is more prized than their four to six weeks of guaranteed annual vacation leave. But it was not clear just how sacrosanct that time off was until Thursday, when Europe’s highest court ruled that workers who happened to get sick on vacation were legally entitled to take another vacation.

“The purpose of entitlement to paid annual leave is to enable the worker to rest and enjoy a period of relaxation and leisure,” the Court of Justice of the European Union, based in Luxembourg, ruled in a case involving department store workers in Spain. “The purpose of entitlement to sick leave is different, since it enables a worker to recover from an illness that has caused him to be unfit for work.”

With much of Europe mired in recession, governments struggling to reduce budget deficits and officials trying to combat high unemployment, the ruling is a reminder of just how hard it is to shake up long-established and legally protected labor practices that make it hard to put more people to work and revive sinking economies.

The workers originally won their case in a Spanish court, where they argued that collective bargaining agreements made a distinction between annual leave and sick leave that was recognized by Spanish law. The National Association of Large Distribution Businesses, known as Anged, appealed to the Supreme Court in Madrid, which then asked the Court of Justice for a ruling on how to apply European law covering working times.