Background: Brain metastases (BM) represent the most common intracranial tumor in adults. An estimated 20% of all patients with cancer will develop BM. Stereotactic Radiosurgery (SRS) is a major treatment option for BM. For SRS treatment planning and outcome evaluation, magnetic resonance imaging (MRI) are acquired before and at multiple stages during the follow-up. Accurate segmentation of brain tumors on MRI is crucial for treatment planning and response evaluation. Detection and segmentation of BM is a tedious and time-consuming task for many radiologists that could be optimized with machine learning methods. Previous studies evaluated the segmentation performance of several deep learning algorithms, but focused mainly on training and testing the models on the planning MR images only. The purpose of this study was to investigate a well-known deep learning approach (nnU-Net) for BM segmentation and to evaluate its performance on both planning MR images and follow-up MR images based on training on planning MR images only and testing with both planning MR and follow-up MR images. Method: Pre-treatment contrast-enhanced T1-weighted brain MRIs(i.e. the planning MRI) were collected retrospectively for 263 patients with BM. Scans were made as part of clinical care at the Gamma Knife Center of the Elisabeth-TweeSteden Hospital (Tilburg, the Netherlands). This total of 263 patients were split into 203 patients for model training/validation and 60 patients for testing. For these 60 patients used for testing, the post treatment contrast-enhanced follow-up T1-weighted brain MRI scans(i.e. follow-up MRI) were also retrospectively collected. These 60 patients who were part of the testing set are from the set of patients included in the Cognition And Radiation Study A(CAR-Study A) at ETZ. The follow-up (FU) scans were made at 3, 6, 9, 12, 15, and 21 months after treatment. The nnU-Net model was trained with the planning MR images, and then tested separately against the planning and follow-up MR images. Results: When tested with planning MR images, the model obtained a dice similarity coefficient (DSC) of 0.940, a False Negative Rate (FNR) of 0.065 and a sensitivity of 0.934. When tested with the follow-up MR images 3, 6, 9, 12, 15 and 21 months after treatment , the model obtained, respectively, a DSC of 0.759, 0.667, 0.604, 0.589, 0.666 and 0.574, an FNR of 0.288, 0.379, 0.445, 0.470, 0.409, and 0.487 and a sensitivity of 0.711, 0.620, 0.554, 0.529, 0.590, and 0.512. Conclusion: The model achieved a good performance score for planning MR images. The nnU-Net model can automatically detect and segment brain metastases with high sensitivity, and low FNR. Though there is a decline in the DSC and an increase in the FNR of the model for the follow-up MR images, the algorithm could be a beneficial tool for clinicians and assist them for diagnosis, treatment planning and treatment response evaluations during follow-ups of BM patients.