WASHINGTON — A last-ditch attempt by President Trump and Senate Republicans to dismantle the Affordable Care Act appeared to collapse on Monday as a pivotal senator announced her firm opposition to the latest repeal plan, virtually ensuring that Republicans would not have the votes they need for passage.

The announcement by the senator, Susan Collins of Maine, effectively dooms what had been a long-shot effort by Republicans in the Senate to make one more attempt at repealing the health law after failing in dramatic fashion in July.

The demise of the latest repeal push means that Republicans are now all but certain to conclude Mr. Trump’s first year in office without fulfilling one of their central promises, which the president and lawmakers had hoped to deliver on quickly after Mr. Trump took office.

For seven years, Republicans have said they would repeal President Barack Obama’s signature domestic achievement and replace it with a new health care system more palatable to conservatives. But they were never able to formulate a replacement that was both politically and substantively viable.