Canada will create a legal framework to guarantee the rights of indigenous people in all government decisions, doing away with policies built to serve colonial interests, Prime Minister Justin Trudeau said on Wednesday.

In a sweeping speech that condemned past governments for failing to do enough to protect the rights of aboriginals, Trudeau said the planned legislation would ensure “rigorous, full and meaningful” implementation of treaties and other agreements.

“We need to get to a place where indigenous peoples in Canada are in control of their own destiny, making their own decisions about their future,” Trudeau said in a speech to the House of Commons.

“Going forward, recognition of rights will guide all government relations with indigenous peoples.”

Trudeau, who came to power in 2015 promising to repair Canada’s relationship with aboriginals, said the government would consult with indigenous groups as well as provinces, industry and the public as it writes the legislation, which will be introduced this year and implemented before the 2019 election.

Indigenous Canadians, who make up about 5 percent of Canada’s 36 million people and face more poverty and violence and have a shorter life expectancy, have fought for generations to gain greater control of the development of Canada’s vast natural resources.

While treaty rights with aboriginals are already recognized under Canada’s Charter of Rights and Freedoms, the new legal framework would ensure the constitution is the starting point for such matters as resource development, self-governance, land rights and social issues.

“This framework could establish new ways to resolve disputes, so that collaboration becomes the new standard, and conflict the exception rather than the rule,” Trudeau said.

Thousands of legal challenges brought by aboriginal groups have ground their way through the court system at a huge cost, said Ken Coates, a professor at the University of Saskatchewan.

With the Supreme Court broadly accepting indigenous rights, the government appears ready to try to clarify and implement them in decision-making, rather than making decisions first and then fighting in court.

“I’m really hopeful this will be a major reset of the relationship and will send the message that Canada is ready for a fundamental reconfiguration of confederation in a way that is consistent with constitutional law and aboriginal aspiration. If we can get there that is a major achievement,” said Coates.