BERLIN — A leading German nationalist politician has won a court injunction forcing Facebook to ensure a user's slur against her can't be seen in Germany.

In a post, a user had called Alice Weidel, co-leader of the Alternative for Germany party, a "dirty Nazi swine" for reportedly opposing same-sex marriage.

While Facebook hid the post from German users, Weidel's lawyers argued it could be easily viewed in Germany by using a VPN service that routes Internet traffic through computers in another country.

A spokesman for Hamburg's regional court, Kai Wantzen, said Monday that Facebook faces a fine of 250,000 euros ($301,750) if it fails to comply with the injunction.

Facebook didn't immediately respond to a request for comment.

Weidel has previously accused the German government of seeking to censor online speech.