Kristi Noem, the homeland security secretary, bungled answers on Tuesday about habeas corpus, incorrectly asserting that the legal right of people to challenge their detention by the government was actually the president’s “constitutional right” to deport people.

As the Trump administration works to carry out its promised mass deportations, efforts that largely fall under Noem’s jurisdiction, officials have floated the idea of suspending habeas corpus for immigrants being expelled from the country.

At a Senate hearing, Sen. Maggie Hassan, D-N.H., asked Noem about the issue. “Secretary Noem,” she asked, “what is habeas corpus?”

“Well,” Noem said, “Habeas corpus is a constitutional right that the president has to be able to remove people from this country and suspend their right to —”

“No,” Hassan interjected. “Let me stop you, ma’am. Excuse me, that’s incorrect.”

Noem’s answer, which echoed the Trump administration’s expansive view of presidential power, flipped the legal right on its head, turning a constitutional shield against unlawful detention into broad presidential authority.

Article I of the Constitution, which focuses on the powers of Congress, says that writs of habeas corpus are a privilege that “shall not be suspended, unless when in cases of rebellion or invasion the public safety may require it.” Legal experts generally agree that those directions give only Congress the authority to suspend it.

President Donald Trump has likened the past surges of migrants entering the United States to invasions, and Stephen Miller, a main architect of the White House’s immigration policy, said this month that the administration believed it could suspend the right of immigrants to challenge their detentions in court in order to speed up deportations.

Last week at a House hearing, Noem said that she was “not a constitutional lawyer” but that she believed a surge of migrants might justify suspending their legal rights.

On Tuesday, she told senators on the homeland security committee that she believed that Trump had the “authority under the Constitution” to decide if habeas corpus could be suspended. Noem also said that Trump had “never communicated to me or his administration” that he was considering suspending it.

Habeas corpus has been suspended just four times in American history, most recently in 1941 after the attack on Pearl Harbor. In three of the suspensions, the authorities cited specific congressional bills to justify the move, except in the case of Abraham Lincoln, who suspended habeas corpus at the start of the Civil War in 1861, while Congress was not in session.

Lincoln’s action was challenged and rejected by the courts. In 1863, Congress passed a law giving him the right to suspend habeas corpus for the duration of the war.

Noem cited Lincoln’s actions to justify Trump’s ability to suspend habeas corpus. But under questioning from Sen. Andy Kim, D-N.J., she said she wasn’t sure how many times the right had been suspended or where the constitutional authority to suspend it came from.

“Do you know which article it is in?” Kim asked.

“No, I do not, sir,” Noem said.

“Well, it’s in Article I,” he replied. “Do you know which branch of government Article I outlines the tasks and the responsibilities for?”

“Yes,” Noem said. “Congress.”