McDonald’s has apologised after a Muslim woman complained she was told to remove her headscarf or leave one of the fast-food chain’s restaurants, saying she was told it was a security threat, reported The Guardian.

The 19-year-old student , who asked not to be named, said she was stopped in a north London McDonald’s by a security guard who repeatedly told her to remove her hijab on Thursday evening.

When she refused, she said the guard appeared shocked but continued to ask, so she decided to film the incident on her phone. A friend later uploaded it to Twitter on her behalf.

In the video, the woman, who is a British Muslim of Middle Eastern descent, asks the guard why she cannot come into the McDonald’s. He responds: “It’s just a matter of taking it off.”

“It’s not just a matter of taking it off. I wear this for religious reasons and I’m not ashamed of it, and I will stand in line and I will get the food I want, because this isn’t OK,” she replies.

A member of the public intervenes to tell the security guard he cannot ask the woman to remove her hijab, to which he responds: “It’s none of your business.”

When the woman says “this is fucking ridiculous”, a member of staff replies “don’t be rude” and tells her to stop filming. She refuses. She is then told she will be served but says: “I don’t want want anything any more.”

The student told the Guardian: “I thought: ‘It’s finally happening to me,’ like it has to so many hijabis. It didn’t feel real because I had seen so many videos like this and it was finally happening to me in real life. I was in so much disbelief.

“The friend I was with was shocked and scared, and said it was a risky situation. When it was over, I finally realised how these situations can become dangerous. This is not a one-off thing.

“I will never walk into a McDonald’s again,” she added.

A spokeswoman for McDonald’s said the chain “does not have a policy in place which restricts or prevents anyone wearing a hijab, or any other religious dress, from entering” one of its restaurants.

She said: “We welcome customers of all faiths and would like to apologise to the customer as this situation should not have taken place. We are taking this matter extremely seriously and are addressing this with the individuals involved.”