Newly elected Speaker of the U.S. House of Representatives Paul Ryan wields the speaker's gavel for the first time on Capitol Hill in Washington October 29, 2015. REUTERS/Gary Cameron

(Reuters) House of Representatives Speaker Paul Ryan on Sunday ruled out working with President Barack Obama on overhauling U.S. immigration policy, saying it would be “a ridiculous notion” to pursue legislation because Obama cannot be trusted on the issue.

Republicans have fought Obama’s unilateral steps that bypassed a gridlocked Congress to try to shield millions of illegal immigrants from deportation.

Obama’s executive orders, announced last November but put on hold by the courts, would let up to 4.7 million illegal immigrants stay without threat of deportation. It was aimed mainly at helping 4.4 million people whose children are U.S. citizens or legal permanent residents.

The immigration issue has driven a wedge between Hispanics, an increasingly important voting bloc, and Republicans, many of whom take a hard line on illegal immigration, to the benefit of Obama’s fellow Democrats. Most of the estimated 11 million illegal immigrants in the United States are Hispanic.

Ryan, a Wisconsin Republican chosen as speaker on Thursday to replace the retiring John Boehner, said he would not try to advance comprehensive immigration legislation while Obama, whose term ends in January 2017, is president.

“I think it would be a ridiculous notion to try and work on an issue like this with a president we simply cannot trust on this issue,” Ryan said in an interview aired on the CBS program “Face the Nation.”

“He tried to go it alone, circumventing the legislative process with his executive orders, so that is not in the cards. I think if we reach consensus on how best to achieve border and interior enforcement security, I think that’s fine,” Ryan added.

Ryan acknowledged that he promised the House Freedom Caucus, which includes the most conservative members of the House, not to bring up immigration reform legislation, and blamed Obama.

“This president tried to write the law himself,” Ryan told the CNN program “State of the Union”, accusing Obama of exceeding his constitutional powers. “Presidents don’t write laws. Congress writes laws.”

In the race for the 2016 Republican presidential nomination, candidate Donald Trump and others have talked tough about illegal immigration. Trump has promised to build a wall on the U.S.-Mexico border and to deport all illegal immigrants already in the United States.

The Senate in 2013 voted to pass bipartisan legislation for the biggest overhaul of U.S. immigration laws in decades in a generation, but the measure failed to win House approval thanks to opposition by conservative Republicans.

Pablo Manriquez of the Democratic National Committee called Ryan’s comments “laughable” and said the Republicans are the ones who are untrustworthy on immigration reform.

“Two years ago, Republicans backed away from a comprehensive, bipartisan agreement that would have further strengthened our borders while requiring those who want to contribute to our country to register, undergo a full background check, pay a fine and pay taxes, and get in the back of the line for a path to citizenship,” Manriquez said.

In an interview aired on “State of the Union”, Boehner said he regrets immigration reform legislation was not passed while he was speaker.

Asked about whether the right flank among House Republicans bore some responsibility for thwarting immigration legislation, Boehner said there was “probably some blame there as well.”

“Reforming our immigration system, securing our borders would be good for America. But unfortunately the president just kept poisoning the well – poisoning the well – to the point where it was impossible to put it on the floor of the House,” Boehner said.

In August, Senate Majority Leader Mitch McConnell said Obama’s immigration actions made it “impossible” for the current Congress to act but that lawmakers could do so in the next Congress under a different president.