Prime Minister Justin Trudeau of Canada has appointed the first woman as permanent leader of the Royal Canadian Mounted Police, which has been dogged in recent years by accusations of discrimination, sexual assault and other scandals.

Mr. Trudeau said on Friday that Brenda Lucki, who has been with the national police force for 31 years, would take over as commissioner in April.

The previous commissioner, Bob Paulson, retired in June after more than five years in the job. During his tenure, Mr. Paulson gave a tearful apology as the R.C.M.P. settled a series of harassment, discrimination and sexual abuse claims that deeply embarrassed the force.

The mounted police is also under fire for not doing enough to protect Canada’s largely marginalized and impoverished aboriginal population.