Transformer-based methods have demonstrated potential capability in object detection of synthetic aperture radar (SAR) images. However, their reliance on global features and quadratic complexity hinders real-time and precise localization of small objects. To deal with these issues, in this work, a Mamba in Transformer DETR (MIT-DETR) framework is proposed. In MIT-DETR, the features are initially divided into visual sentences and processed by Mamba to extract global information with linear complexity. These visual sentences are then further divided into words, which are analyzed for local information through the transformer. In addition, a multiscale dilated attention (MSDA) module is designed with the purpose of obtaining rich multiscale information at a low cost. Numerical experiments show that MIT-DETR improves AP50 by 5.01% and FPS by 5.1 on HRSID compared to the baseline. These results demonstrate the effectiveness and superiority of the proposed strategy. The code will be available at https://github.com/CongLi-18/MIT-DETR.