WASHINGTON — Wisconsin Rep. Paul Ryan told GOP lawmakers late Tuesday that he will run for speaker, but only if he emerges by week’s end as their consensus candidate – a bid to impose unity on a disordered and divided House.

Ryan spoke to the House GOP behind closed doors and said if all factions can share his vision and he can get the endorsement of the major caucuses, then he will “be all in.”

Ryan, 45, under intense pressure to seek the post, gave his colleagues until Friday to express their support. The question will be whether he can win over the hardline House Freedom Caucus, which drove the current speaker, John Boehner, to announce his resignation and scared off Boehner’s No. 2, Majority Leader Kevin McCarthy.

Ryan, the GOP’s 2012 vice presidential nominee, had consistently said he does not want to be speaker and would prefer to stay on as chairman of the tax-writing Ways and Means Committee, which he’s described as his dream job.

But he’s been under pressure to reconsider from Boehner and other party leaders who argue he is the only House Republican with the stature and broad popularity to unite a caucus divided against itself, at a moment of deep turmoil.

Congress is hurtling toward an early November deadline to raise the federal borrowing limit or invite a first-ever default. It is also facing a deadline to pass spending legislation or risk a government shutdown in early December.

Several members of the fractious Freedom Caucus were unconvinced after hearing from Ryan.

“I think he has to campaign for it. We’ve heard one speech,” said Rep. Scott Perry, R-Pa. “We’re willing to listen but it’s the beginning of the conversation as far as I’m concerned.”