Canada's former justice minister has quit Prime Minister Justin Trudeau's cabinet amid allegations Trudeau's office pressured her to avoid prosecuting a major Canadian engineering firm.

Veterans Affairs Minister Jody Wilson-Raybould released a letter Tuesday announcing her resignation. She was demoted from the post of justice minister last month.

The Globe and Mail newspaper reported last week that Trudeau or his staff pressured her to arrange a deal with Montreal-based SNC-Lavalin that would let it avoid criminal prosecution on allegations of corruption involving government contracts in Libya.

Wilson-Raybould has hired a former Supreme Court justice to advise her on what she can say publicly about the matter.

Her resignation is a potential blow to Trudeau as he faces re-election this year. He has denied directing Wilson-Raybold to arrange such a deal.