WASHINGTON — Democratic senators blistered President Donald Trump’s health secretary on Tuesday, telling him that the Trump administration’s efforts to undo health insurance protections for people with pre-existing conditions made a mockery of the president’s campaign to rein in prescription drug prices.

The secretary of health and human services, Alex Azar, told Congress that he would be glad to work with lawmakers on legislation — “alternatives to the Affordable Care Act, modifications of the Affordable Care Act” — to provide access to insurance for people with pre-existing conditions.

The decision regarding pre-existing conditions is “a constitutional and legal position, not a policy position,” Azar told the committee.

Azar also conceded that Trump’s promise late last month that drug companies would come forward with “voluntary massive drops in prices” within two weeks might not be fulfilled by that deadline. He told Congress on Tuesday that several drugmakers wanted to reduce prices but were reluctant to do so for competitive reasons.

The heated exchanges came just days after the Justice Department told a U.S. District Court in Texas that it would no longer defend crucial provisions of the Affordable Care Act that protect consumers with pre-existing medical conditions.

The senators told Azar that the effort to lower drug prices and the push to end protections for people with pre-existing conditions contradicted each other. If a federal court accepts the administration’s argument on pre-existing conditions, they said, tens of millions of people with such conditions could lose access to affordable insurance that includes coverage for prescription medicines.

“This is like some kind of sick joke,” said Sen. Maggie Hassan, D-N.H.

Azar, testifying at a hearing of the Senate health committee, said bringing down drug prices was a top priority for Trump. He suggested the Justice Department’s position on pre-existing conditions was separate.

In a Rose Garden speech on May 11, Trump unveiled a strategy to “bring soaring drug prices back down to earth” by promoting competition among pharmaceutical companies and by requiring drugmakers to disclose prices in their ubiquitous television advertising.

Then last week, the Justice Department made its novel argument against protections for pre-existing conditions. The 2010 health law required most Americans to have insurance or pay a penalty with their taxes. In December, as part of a huge tax-cutting bill, Congress eliminated the penalty. The Supreme Court upheld the mandate in 2012 as an exercise of Congress’ taxing power. Without any tax penalty, the Justice Department said, the mandate is unconstitutional. And the protections for people with pre-existing conditions, being inseparable from the mandate, must also fall, Attorney General Jeff Sessions said.

Sen. Patty Murray of Washington, the senior Democrat on the health committee, said Tuesday that she was appalled that the administration refused to defend protections for people with pre-existing conditions, one of the most popular provisions of the Affordable Care Act.

Sen. Bob Casey, D-Pa., said, “I don’t know of any American who wants to go back to those days when you could be denied coverage or treatment because of pre-existing conditions.”

Republicans repeatedly tried and failed to repeal or roll back the health law last year.

The term “pre-existing conditions” refers not just to serious illnesses like cancer. Before the Affordable Care Act, some insurers denied coverage or charged higher premiums to people with high blood pressure, seasonal allergies, diabetes, arthritis and migraine headaches, among other conditions. The Kaiser Family Foundation has estimated that at least one-fourth of Americans under 65 have conditions that could have made them uninsurable under medical underwriting practices used before the Affordable Care Act.

At a bill-signing ceremony on May 30, Trump said that major drug companies would, within two weeks, announce “voluntary massive drops in prices.”

Azar told Congress on Tuesday that might not happen on that schedule.

“We had several drug companies come in who want to execute substantial material reductions in their drug prices,” Azar said. “They are finding hurdles from pharmacy benefit managers and distributors.”

The benefit managers, he said, make money when drug companies set high list prices because the managers receive rebate payments from drugmakers — a percentage of the list price — in return for promoting the use of those companies’ products.

“Everybody wins when list prices rise — except for the patient, whose out-of-pocket cost is typically calculated based on that price,” Azar said. For this reason, he said, “we may need to move toward a system without rebates, where pharmacy benefit managers and drug companies just negotiate fixed-price contracts.”

The Senate majority leader, Mitch McConnell, R-Ky., said Tuesday that the protections for people with medical problems had broad support in that chamber.

“Everybody I know in the Senate — everybody — is in favor of maintaining coverage for pre-existing conditions,” McConnell said.

Sen. Chuck Schumer of New York, the Democratic leader, said that if Republicans were serious about that, they should join Democrats in urging the Justice Department to reverse its position on pre-existing conditions.

The American Cancer Society Cancer Action Network, the American Diabetes Association and the American Heart Association said in a joint statement with other patient advocacy groups that the Justice Department’s position could be catastrophic for their members, and they urged the Trump administration to reconsider.

Azar tried to bring the conversation back to the president’s drug pricing proposals. He said he believed he had the authority, as secretary, to require drug companies to disclose prices in their advertisements and to restrict the payment of drug rebates in Medicare. But he said he would welcome action by Congress to clarify that authority.

And he asserted that the president’s proposals were bolder than Democrats acknowledged.

“We’re talking about the wholesale restructuring of the drug pricing and drug distribution system in this country,” he said.