WASHINGTON — Paul Ryan wants to move past his differences with Donald Trump after a divisive campaign, but the House speaker's relationship with the incoming president will face a test as he carves out his own agenda for Republicans in Congress.

Ryan faces competing pressures from different parts of his own caucus. Some members warn they'll be monitoring his loyalty to Trump. Other senior members want Ryan to stick to the conservative line on spending and other matters and not roll over for Trump, a stance that could bring a quick end to the uneasy peace between the speaker and the new president.

The two men see eye to eye on repealing Obamacare as the first order of business, but don't agree yet on the details of how to replace it. Other early flashpoints are likely to be Trump's insistence on a $1 billion infrastructure plan and a wall along the Mexican border _ both of which could balloon the deficit, anathema to a spending hawk like Ryan.

"This speaker is not a potted plant, and he has strong opinions on matters of policy," said Rep. Charlie Dent of Pennsylvania, a Ryan ally and co-leader of a group of House moderates. He said Ryan will work with the Trump administration, "but I just don't see the speaker rolling over on every policy."

The Wisconsin Republican has emerged unscathed so far from his unprecedented decision last fall to distance himself from the then-Republican presidential nominee. Trump isn't retaliating yet, but it's uncertain whether their tentative truce can last.

Even with full Republican control of Congress and the presidency, some conservatives warn that Ryan, 46, will be on a short leash. Trump has strong support within the House GOP conference, and the speaker must tread lightly because it was the president-elect's Republican uprising that succeeded, not his own.

And while Trump may not be perfectly meshed with the policy thinking of the most conservative House Republicans, many of them are kindred spirits in his anti-establishment, change-Washington bent.

Ryan "miscalculated the mood of the conference by not backing Trump and miscalculated again when he assumed a Trump loss would vindicate the first mistake," said a leading House conservative, in a view held by other pro-Trump conservatives who are wary of the speaker.

Ryan and his allies may be counting on letting Trump lead initially in hopes of wearing him down and taking control of the legislative agenda, the same lawmaker said, adding that that would be a mistake. If Ryan does this, he says, Trump conservatives will abandon him.

"Trump leads, Ryan agrees, is the only way to survive," the lawmaker said.

After Trump grabbed the party's presidential nomination, Ryan openly criticized some of his controversial remarks, including his claim that a federal judge with Hispanic heritage couldn't be fair. But some House colleagues thought Ryan went too far by saying he would no longer defend or campaign for the party's nominee after a video surfaced in early October that showed Trump bragging about groping women.

Trump openly complained about Ryan's disloyalty and called him "weak and ineffective." He tweeted that it was difficult to do well with "zero support" from the speaker.

Remarkably, the two were never seen in public together throughout the entire campaign, making a joint appearance only after Trump's unexpected victory.

Few dispute that Trump, 70, has a long memory. But multiple lawmakers insist they have seen no retaliatory push being organized by Trump forces or anyone else to block Ryan's re-election as speaker.

Paul Brace, a political scientist at Rice University in Houston, said that as long as Trump remains relatively popular in his party and the GOP is riding high, Ryan has little choice but to remain fairly passive in dealings with him.

Trump missteps that undermine his standing could create an opportunity for Ryan to flex muscle, Brace said, but even that could harm Republican popularity and diminish prospects for Ryan to achieve his agenda.

Adam Brandon, president of FreedomWorks, a Washington-based conservative group, predicted "a pretty harmonious" first six months of the congressional session. But he said government spending and long-term deficit issues may ultimately put the squeeze on Ryan's cooperation with Trump.

For now, Trump's and Ryan's public statements have concentrated on policies on which they agree, such as the broad outlines _ if not the tricky details _ of a swift repeal of the Affordable Care Act, regulatory overhauls and a tax plan. They've largely ignored potential areas of disagreement, such as spending to improve infrastructure.

Yet, amid the niceties come snarky asides from the president-elect. "He's like a fine wine. Every day I appreciate his genius more and more," said Trump of Ryan at a post-election event in the speaker's home state of Wisconsin.

But Trump quickly added, "Now, if he goes against me, I am not going to say that."

Ryan's office declined to comment about that barb, and the speaker has been lavishing praise on Trump and playing up their new teamwork.

"I'm impressed with how Donald Trump handles himself. I'm impressed with how magnanimous he is. I'm impressed with just his demeanor, his temperament. What I'm really impressed with is the Cabinet he's putting together," Ryan gushed on Fox News Dec. 9.

Head-butting could come over some Trump proposals, especially those that could cost a lot of money. Those include Trump's promised wall along the U.S. Mexico border, a $1 trillion infrastructure plan, changes in trade policies and boosting military spending _ while slashing corporate and personal taxes.

During the campaign, Ryan poked fun at Trump's big-dollar infrastructure spending proposal, saying it wasn't part of the House Republican "Better Way" agenda. Since Trump's election Ryan has been sounding a different tune, saying they'll figure it out.

At the same time, Ryan is promoting his own aims of reining in spending on entitlement programs to keep them solvent, including Medicare. Trump didn't embrace massive changes to Medicare or Social Security during the campaign, saying he wanted to protect them.

Ryan might take comfort in Trump's selection of Republican National Committee Chairman Reince Priebus, a Ryan ally and fellow Wisconsinite, as White House chief of staff, and former House member Mike Pence as vice president. Still, it was Pence who already shut the door on action any time soon on Ryan's Medicare overhaul.

Ryan has explained, "I wouldn't say we disagree on entitlements. We actually haven't had a conversation about comprehensive entitlement reform."

Dent, the co-leader of House moderates, said, "To be fair, the Trump team has not yet presented a lot of detailed policy ideas."