Taylor Swift has been granted a restraining order against a man who has allegedly been stalking her since 2011.

The singer won the order after claiming a fan had repeatedly sent her frightening emails, letters and social media posts in the last three years, and she now fears for her safety.

In legal documents obtained by TMZ.com, Swift alleges the fan claimed she was his wife, and threatened to kill her family members.

Some of the alarming messages read: "Dearest Taylor, I'll kill any man who gets in the way of our marriage'', and "If anyone in Taylor Swift's family gets killed, it is not my fault".


He also vowed to carry a gun at all times to protect the singer.

A judge ruled the fan must stay at least 90 metres away from Swift and the three members of her immediate family.