Fetching details from the dictionary...
three ministries (under the ritsuryō system: Ministries of Civil Services, Health and War)
three departments (in Tang dynasty China: Secretariat, Chancellory and Dept. of State Affairs)
「三省」 has another reading with different meanings.