This study explores the effectiveness of transformer-based models for Named Entity Recognition (NER) in Urdu legal documents, a critical task in low-resource language processing. Given the specialized terminology and complex syntax of the legal texts, accurate entity recognition in Urdu remains a challenge. We developed a legal Urdu dataset that contains 117,500 documents, generated synthetically from 47 different types of legal documents, and evaluated three BERT-based models. XLMRoBERTa, mBERT, and DistilBERT were analyzed by analyzing their performance on an annotated Urdu legal data set. mBERT demonstrated superior accuracy (0.999), and its F1 score (0.975) outperforms XLMRoBERTa and DistilBERT, highlighting its robustness in recognizing entities within low-resource languages. To ensure the privacy of personal identifiers, all documents are anonymized. The dataset for this study is publicly hosted on HuggingFace.