WASHINGTON (AP) — President Donald Trump said Friday he would not sign a "moderate" immigration bill being finalized by House Republicans, igniting confusion on Capitol Hill over a GOP bill that Trump's allies believed had his support.

House Speaker Paul Ryan has said that Trump backs the emerging immigration compromise between the party's battling conservative and moderate wings. GOP aides said Trump's remark caught party leaders off-guard, and White House officials did not immediately respond to requests to clarify the president's comment.

Republicans leaders plan campaign-season votes next week on the middle-ground bill and a hard-right alternative. Both bills contain stringent security provisions and money to build Trump's proposed wall with Mexico, but only the compromise measure gives young immigrants who arrived in the U.S. illegally as children a chance to ultimately become citizens.

The conservative measure is virtually certain to be rejected due to opposition from moderate Republicans and perhaps all Democrats. The compromise bill's fate is less clear, with some conservatives opposing it for not going far enough. Trump's endorsement has been viewed as critical if it is to have a chance of passage.

"I'm looking at both of them," Trump told reporters at the White House. "I certainly wouldn't sign the more moderate one."

Many Republicans view the House votes as important election-year statements to voters on where they stand on immigration. Conservatives are leery of legislation protecting from deportation immigrants who arrived illegally, calling it amnesty. Centrists, many from districts with many Hispanic and moderate voters, want to demonstrate they're trying to protect the immigrants.

In a further confusing note, Trump added, "I need a bill that gives this country tremendous border security. I have to have that. We have to have the wall. Don't have the wall, there's no bill."

House Minority Leader Nancy Pelosi, D-Calif., criticized Trump's stance.

"When the president says he's not going to sign it, just shows how low his standards are," she said.