<h3>Purpose</h3> Current practice for interstitial high-dose-rate (HDR) brachytherapy treatment planning involves manual tracking of needle positions on CT images. Recently, PETRA MRI showed the potential to detect empty interstitial gynecological brachytherapy needles owing to low needle signal, intermediate tissue contrast and high spatial resolution. We aimed to develop an algorithm for automatic interstitial needle tracking on PETRA images by employing their negative contrast against surrounding tissue. <h3>Materials and Methods</h3> Fourteen ProGuide Sharp Needles 6Fx294mm were implanted in an endometrial adenocarcinoma patient using a Syed-Neblett template. One of the needles lay in the obturator center, and six inside the obturator slots. The patient underwent standard CT imaging with copper-filled needles. After marker removal, 3D PETRA images of the patient's pelvis (TR\TE 3.32\0.07 ms, voxel size 0.9 mm<sup>3</sup> isotropic, 416 slices) were acquired on a 3T Siemens Vida MR scanner. PETRA MR images were analyzed for interstitial needle detection using custom code in MATLAB R2022a. A rectangular part of all axial slices where needles may be contained (slices 149-310) was selected. For each slice part, corner points were extracted from the original part and from its sharpened gradient magnitude image by detecting Harris features. Points found within Euclidean distance (ED) of 3 pixels on both images were matched, and the pixel with minimum signal intensity closest to each such point on the original part was selected. Minimum intensity points lying within 2 pixels ED between subsequent slices were considered as possible catheter coordinates. Such points appearing on at least 10 continuous slices were designated as true catheters, and their positions were compared to those visible on CT. <h3>Results</h3> Figure 1a) displays the selected MR image parts for two example slices. Pixels with detected Harris features and their closest signal minima are marked by red and green crosses, respectively, in b). Pixels accepted as needle positions are shown as magenta crosses in c). Matching CT image parts with bright marker-filled needles are displayed in d). Empty interstitial catheters on PETRA images corresponded to local minima of signal intensity, located near Harris features. The assumption of needle position continuity within an allowed distance along subsequent slices helped avoid spurious signal minima, while following needle position variations caused by different deflection angles. Needles guided through the obturator grooves and the central needle were detected only after they became detached from the obturator (ex. figure left). All 14 needles were tracked along their visible length inside tissue (ex. figure right). Visual comparison to CT images confirmed interstitial catheter detection on MRI. Selecting a range of slices and zooming on a part of each slice for analysis reduced computational time and output data size. <h3>Conclusions</h3> Automated detection of interstitial needles is feasible on PETRA MR images and may facilitate MR-only treatment planning in interstitial HDR brachytherapy. The newly developed algorithm was able to track all needles inside tissue based on their signal intensity characteristics, without requiring manual seed position placement.