M.I.A. better love Brooklyn ... 'cause the rapper's been banned from leaving the borough with her son ... courtesy of a court order obtained by her filthy rich baby daddy, Benjamin Bronfman.
M.I.A. was reportedly threatening to take her 4-year-old boy Ikhyd to England, her home country ... until Benjamin -- son of Seagram's billionaire Edgar Bronfman Jr. -- was granted a temporary restraining order in a King's County (aka Brooklyn) court earlier this week.
Bronfman and M.I.A. were never married, but split up last year. They both live in Brooklyn, separately, and little Ikhyd goes to school there.
The NY Post first reported the TRO ... which is latest battle in what appears to be an ongoing custody war between M.I.A. and Bronfman.