STOCKHOLM — A Muslim woman in Sweden who said she was discriminated against in a job interview for refusing to shake hands on religious grounds has been awarded financial compensation by a labor court.

The woman, Farah Alhajeh, 24, was interviewing for a job as an interpreter at Semantix, a language services company, in the city of Uppsala, north of Stockholm, in May 2016, when the person conducting the interview offered to introduce her to a male boss. Ms. Alhajeh said she placed her hand on her heart as a greeting, smiled, and explained that she avoided physical contact because she was Muslim.

She was shown to the elevator.

“It was like a punch in the face,” Ms. Alhajeh, who was born in Sweden, said by telephone from her home in Uppsala on Thursday, a day after the ruling. “It was the first time someone reacted, and it was a really harsh reaction.”

A Swedish labor court agreed, ruling on Wednesday that the company had discriminated against Ms. Alhajeh, and ordering it to pay 40,000 kronor, or about $4,350, in compensation.