A signature missing from the records of Prime Minister Justin Trudeau's campaign to be elected in his Montreal riding led to a legal process involving lawyers' letters and a court filing to retroactively reset the filing deadline.

Trudeau's official agent in his Papineau riding twice missed the deadline to file his 2015 campaign spending records with Elections Canada, resulting in a court filing to get a retroactive one-day extension. The chief electoral officer had already granted an extension, but the official agent inadvertently missed the deadline a second time when it was filed electronically without Trudeau's signature. Without the candidate's signature, the package was incomplete and considered to have been filed late, requiring the extension to avoid breaking the law.

All candidates have to file extensive financial reports with Elections Canada, including their audited spending records, within four months of an election.

Trudeau's official agent, Jayson Walter Kwasnik, is a chartered accountant who sits on the board of the Institute of Internal Auditors, according to a biography available online. He did not respond to a request for comment.

A news report last April noted Trudeau was one of four Liberal MPs who were late submitting their campaign spending records. Elections Canada records show the last-minute scramble after the missed March 21 deadline came to light.

Three days later, a lawyer for the Liberal Party sent a letter to Elections Canada outlining the reasons why he felt the campaign should be granted the additional extension. Lawyer Marc Laperrière leaned heavily on the fact that the paperwork had been filed on time, but was simply lacking the candidate's signature. Laperrière said the error had no impact on the accuracy of the filing and argued that it was necessary to correct what was essentially administrative error.

On March 31, Kwasnik, filed a request in Quebec Superior Court in Montreal asking a judge to grant the retroactive deadline extension and set it to March 22 rather than March 21. The judge granted the motion on April 4, after a hearing that lasted less than 15 minutes, according to a court record in the Papineau file.

Preparing the documents is an arduous task and takes a long time, Kwasnik argues in the court application, which is provided in French. The campaign records to be filed included receipts and invoices, banking records and list of donations. In the Papineau riding, Liberal officials were reconciling cash as late as February.

The court filing says Elections Canada advised that going to court was the only way to change the deadline.

Asked whether the government is considering changes to ease the requirements, a spokesman for Trudeau would say only that the government looks forward to the latest recommendations by Chief Electoral Officer Marc Mayrand, "that may include steps to strengthen our electoral system and democracy."

It's not uncommon to need an extension. Elections Canada said there were 802 extension requests following the 2015 campaign. MPs accounted for 211 of those requests - that's nearly two-thirds of the House needing extensions - with losing candidates accounting for 591 requests. A spokesman for Elections Canada says all requests were granted.

The penalties for breaking the rules are severe. MPs who don't get an extension can be blocked from sitting in the House. Losing candidates can forfeit their expense reimbursements, which cover 60 per cent of eligible spending.