TOKYO — More than 20 years after it repealed a eugenics law, Japan has agreed to compensate victims of a decades-long government program under which thousands of people were forcibly sterilized because of intellectual disabilities, mental illness or genetic disorders.

Under a bill passed by Japan’s Parliament on Wednesday, the government will offer 3.2 million yen, or about $28,600, to each of the survivors who were sterilized between 1948 and 1996 under the law.

Of the estimated 25,000 people who were sterilized, the government has identified about 5,400, and it is not known how many are still living.

In a statement, Prime Minister Shinzo Abe said that “the government sincerely reflects on and deeply apologizes” for the suffering of the victims, some of whom have filed separate lawsuits seeking further compensation from the government.