A federal judge's injunction against the Obama administration's guidance on bathroom use by transgender students was unnecessary, White House spokesman Josh Earnest said on Monday, because the guidance was not a mandate.

"It was certainly not a mandate and was never described as such by the administration," Earnest said, noting that the guidance was a response to questions from school administrators across the country.

"I recognize that there are people who are eager to play politics with this just a few months before a national election," Earnest said.

The administration and schools are focused on "practical problem solving," Earnest said. "We have worked effectively with local school districts across the country to try to help them address this complicated issue. Our goal has been from the beginning to provide for the safety and security and dignity of students all across the country."

"So I guess the point is we've got a lot of confidence in the guidance that was put forward. We certainly have confidence in the legal basis for issuing that guidance," he said. Earnest added that the White House will "obviously" be respectful of rulings from federal judges, and will let the Justice Department handle the response.

Justice on Monday morning had no immediate response to the decision, but did say it was "disappointed" in the ruling.