The White House blasted newly appointed House Speaker Paul Ryan for closing the door on the idea of working with President Barack Obama to pass comprehensive immigration reform.

On Sunday, the Wisconsin lawmaker announced he has no intention of passing immigration legislation while President Obama is in office. Ryan also said Obama cannot be trusted on the issue because he chose to circumvent Congress and pass an executive order in 2014 to shield millions of undocumented immigrants in the U.S. from deportation.

"The president has proven himself untrustworthy on this issue, because he tried to unilaterally rewrite the law himself. Presidents don't write laws. Congress does," the new Speaker said in an interview on NBC's "Meet the Press," according to The Hill.

In response, White House Press Secretary Josh Earnest called Ryan's comments on an immigration overhaul "ironic." Ryan helped write a bipartisan immigration reform bill in 2013, but later decided to stand with House GOP leaders who refused to present the bill for a vote, reports The Associated Press.

Ryan also worked behind the scenes with House members last year to promote an immigration bill that included a path to citizenship for those here illegally after it had passed in the Senate.

"It's a little hard for him to make the claim that somehow the president hasn't acted in good faith on immigration when Speaker Ryan actively thwarted a compromise he himself helped to broker," Earnest said. "And then for him to come back and claim it's somebody else's fault? It's preposterous."

Ryan, however, has vowed in closed-door meetings with conservative lawmakers not to push for immigration reform.

"I understand he has some complicated politics to take care of in the House when it comes to significant fractures inside of his own conference. He knows best how to handle that," Earnest said. "But pandering to the extreme right wing of the Republican conference, including preposterous comments like that, has not served the party or the country very well."