TORONTO -- The federal government is arguing the Truth and Reconciliation Commission has no authority to take part in legal action.

It says the commission is simply a department of government without any legal standing.

The commission was set up to settle a class action arising out of the Indian residential school system.

It is in court in Toronto hoping to force the government to provide millions of documents it wants.

It accuses Ottawa of dragging its feet, making it impossible for it to do its job.

However, a government lawyer says the commission has no standing to litigate.

"It is not a commission of inquiry," Nancy Coughlan told Ontario Superior Court. "It is expressly prohibited by its terms against acting as an inquiry."

Instead, the commission was established as a government "department" to resolve the lawsuit over the Indian residential schools system, she said.

Nothing in the settlement gave the commission the capacity to conduct litigation "on behalf of the Crown or against the Crown," Coughlan said, adding that would be the exclusive purview of the attorney general.

The lawyer also said the commission was not a separate legal entity and had no legal personality.

After years of mounting frustration over access to government records, the commission has turned to the courts for help.

Essentially, it accuses Ottawa of stymying requests for essential documents, making it impossible to complete its work as required by July 1, 2014, and within budget.

The application wants the court to clarify the government's obligations under the settlement with victims of the Indian residential school system that set up the commission now led by Justice Murray Sinclair.

The government maintains it has done its best and there is an internal-dispute mechanism that should have been used to resolve the document issue.

Commission lawyer Julian Falconer says the government has acknowledged that it has as many as five million relevant records, but has turned over only about one million of them.

"Pure and simple, that can't be right," Falconer said.

The commission's mandate is about "protection of the past," which includes instilling in survivors and their families "a sense of control over history" and that means having all the materials in hand, he said.

"The obligation is to produce all relevant documents," he said.