Legal jurisdiction refers to the authority of a court or legal body to make decisions and enforce laws within a specific geographic area or over certain types of cases. This concept is crucial when considering how treaties and international agreements influence legal matters, especially in contexts involving foreign powers and their rights within a nation's territory, as seen in the aftermath of the Treaty of Nanjing.