WASHINGTON, March 22 (Reuters) - U.S. President Donald Trump and Republican congressional leaders appeared on Wednesday to be losing the battle to get enough support in the House of Representatives to pass their Obamacare rollback bill, watched by wary investors in financial markets.

Repealing and replacing Democratic former President Barack Obama’s 2010 Affordable Care Act is a first major test of Trump’s legislative ability and whether he can keep his big promises to business.

The current House Republican rollback plan is scheduled for a floor vote on Thursday but faces stiff resistance from some conservative Republicans, who view it as too similar to Obamacare, and from moderates concerned it will hurt some voters.

Mark Meadows, who heads the conservative House Freedom Caucus, said after a White House meeting on Wednesday there were still not enough votes to pass the bill. He remained hopeful for potential changes to the legislation.

Vice President Mike Pence discussed “a couple of options” to win votes from caucus members, Meadows said, adding the White House was still willing to listen and “hopefully reach consensus.”

Trump and Ryan, the measure’s leading proponent, can afford to lose only about 20 Republican votes or risk failure, since Democrats are united against it. By some estimates, 26 House Republicans have signaled their opposition.

Trump’s promises during his election campaign and his first two months in office have lifted U.S. stock markets to new highs. But stocks fell back sharply on Tuesday as investors worried that a rough ride for the healthcare legislation could affect Trump’s ability to deliver on other big pieces of his agenda, from cutting taxes and regulation to boosting infrastructure.

Stocks were trading around flat on Wednesday, with the Nasdaq up slightly and the S&P trading just above water, although the Dow was weaker. Investors were waiting to see what would come of Thursday’s healthcare vote, after the benchmark stock indexes posted their biggest one-day loss since before the November election on Tuesday.

“The Trump agenda is like a one-lane road with this big truck called ‘healthcare’ in the lead,” said Brookings Institution senior fellow William Galston. “If that truck breaks down, everything else will back up.”

While paying little attention to the details of the House Republican effort, Trump has put considerable effort into shoring up the bill, actively courting conservative lawmakers with objections to the bill.

In a trip to Capitol Hill on Tuesday he warned Republicans that failure could have sharp repercussions in next year’s congressional midterm elections.

Trump kept up his efforts to sell the plan, called the American Health Care Act, on Wednesday, meeting with about 10 House members at the White House, said Representative Patrick McHenry.

“The president is meeting with a mixed bag of members to continue moving support for the bill,” a White House official said.

“Big day for healthcare. Working hard!” tweeted Trump, who took office in January.

Trump declined to say what he would do if the proposed legislation fails in the House. Asked if he would keep pushing the bill, he told reporters: “We’ll see what happens.”

“GET HEALTHCARE DONE”

At rallies this week in Nashville, Tennessee, and Louisville, Kentucky, meant to drum up support for the bill, Trump spent little time discussing specifics and made clear he saw it as a step on the road in a broader agenda that includes his planned tax cuts.

Obamacare overhauled the U.S. health insurance system and aimed to reduce the numbers of Americans with no health insurance. Twenty million people gained insurance under the law, but Republicans have long targeted it as government overreach because of its mandates on individuals and employers, and they have criticized rising costs of insurance premiums.

The nonpartisan Congressional Budget Office estimated 14 million people would lose medical coverage under the Republican plan by next year. It also said that 24 million fewer people would be insured by 2026.

Republicans argued this would not be because 24 million people would be pushed off insurance plans under the proposal. Some would be people dropping out because there would no longer be a penalty for not being covered, said Representative Kevin Brady, Republican chairman of the Ways and Means committee.

In a series of radio interviews on Wednesday, Ryan pressed his case that Republicans had to keep their campaign promise to jettison Obamacare and that all factions of the party should unite to deliver the bill.

“We can get it done,” Ryan said on “The Jay Weber Show.”

He said conservatives who oppose the bill need to recognize that the House bill has to be crafted so it can pass the Senate, where Republicans hold a slimmer majority, and that they will have opportunities to pursue changes later.

Even if the legislation passes the House, its fate is uncertain in the Senate, where a number of Republicans have spoken out against the House version.

Ryan said he expected the Senate to work on the bill next week and another House vote on the final measure to be held in the week of April 3, with it headed to the White House for Trump to sign it into law by Easter, April 16.

That optimistic timeline would depend on a rapid end to Republican resistance to the bill.

Republican leaders made some changes to the bill this week to try to satisfy critics from their own party but that and Trump’s visit to Congress on Tuesday did not appear to sway members of the House Freedom Caucus.

At a meeting that could last all day Wednesday, the House Rules Committee was due to set the rules for Thursday’s expected floor debate, including deciding what amendments, if any, will be allowed. It faced a list of more than two dozen proposed amendments from both Republicans and Democrats.

(Additional reporting by Doina Chiacu, Susan Cornwell, Susan Heavey, Jeff Mason, Steve Holland in Washington and Megan Davies in New York; Writing by Frances Kerry; Editing by Kevin Drawbaugh and Bill Trott)