Immigration policy was a big topic at the Univision-Washington Post Democratic presidential debate in Miami. On several occasions, Hillary Clinton took the opportunity to attack Bernie Sanders’ record on immigration.

At one point, she said, "In 2006, when Sen. Sanders was running for the Senate from Vermont, he voted in the House with hard-line Republicans for indefinite detention for undocumented immigrants, and then he sided with those Republicans to stand with vigilantes known as Minutemen who were taking up outposts along the border to hunt down immigrants."

She later repeated both parts of this charge.

Sanders took issue with Clinton’s statements during the debate. Responding to a question from moderator Jorge Ramos about whether he supported the Minutemen, Sanders said, "Of course not. There was a piece of legislation supported by dozens and dozens of members of the House which codified existing legislation. What the secretary is doing tonight and has done very often is take large pieces of legislation and take pieces out of it."

Many readers asked us to take a closer look, so we did. We’ll take the two parts of Clinton’s statement in order.

Sanders voted for 'indefinite detention for undocumented immigrants'

The legislation in question is the Community Protection Act of 2006, which passed the House on Sept. 21, 2006, but died in the Senate.

Sanders did vote for the bill, along with almost all Republicans and a majority of the House Democratic caucus. (Then, as now, Sanders in Congress identifies himself as an independent.) By backing it, Sanders went against the urgings of the American Civil Liberties Union and the National Council of La Raza, a prominent Hispanic group.

So what did the bill do?

According to the Congressional Research Service’s official summary of the bill, it would, among other things, "permit indefinite detention of specified dangerous aliens under orders of removal who cannot be removed, subject to review every six months." The bill itself says, "With regard to length of detention, an alien may be detained under this section, without limitation, until the alien is subject to an administratively final order of removal."

The ACLU, in arguing against passage, said the bill "would broaden the constitutionally dubious practice of indefinite detention. The Supreme Court has twice ruled that indefinite detention raises constitutional concerns, yet the bill unwisely expands that power." The ACLU went on to call the indefinite detention "inhumane, an enormous waste of scarce detention resources and a power expected of repressive regimes, not of our own."

Even though the bill itself does not use the precise words "indefinite detention," the fact that the Congressional Research Service uses it gives Clinton solid support for using that descriptor.

That said, Clinton’s phrasing leaves out a few nuances. Hearing this statement, one might assume the power was a direct threat to a broad swath of the undocumented immigrant population. In reality, the types of undocumented immigrants who would be affected by this provision are a specific, smaller subset -- those who are deportable, often due to having a criminal record, but who are awaiting a final legal decision.

For a sense of scale, the ACLU in 2009 cited an Associated Press report that on Jan. 25, 2009, there were at least 4,170 individuals in detention for six months or longer, with 1,334 of those subjected to detention for one year or more. These are not small numbers, but it’s worth remembering that the best estimate for the total number of undocumented immigrants in the United States is around 11 million. (Clinton did, later in the debate, refer to Sanders voting for "indefinite detention for people facing deportation," which is a more limited universe of people.)

Clinton also didn’t mention that the bill would have required reviews of the detention status every six months. This isn’t a foolproof system -- many such immigrants, for instance, don’t have attorneys -- but it does indicate that the bill included requirements for due process.

Finally, it’s misleading to say, as Clinton did, that supporters were primarily "hard-line Republicans." A number of liberal Democrats also supported the bill, including such prominent lawmakers as House Minority Leader Nancy Pelosi of California and future Sen. Sherrod Brown of Ohio.

In a response released by the Sanders campaign during the debate, the campaign said that his support stemmed from a different part of the bill that dealt with gang members. "Bernie Sanders believes that gang members who committed serious crimes should be deported and voted for legislation that, while overly broad, would do just that," the statement said.

In general, though, Clinton has a point that Sanders supported a bill that includes indefinite detention.

Sanders voted 'to stand with vigilantes known as Minutemen'

Both campaigns acknowledge that this refers to a 2006 amendment -- which Sanders voted for -- to a large Homeland Security appropriations bill. It was designed to bar the Department of Homeland Security from providing "a foreign government information relating to the activities of an organized volunteer civilian action group, operating in the State of California, Texas, New Mexico, or Arizona."

What’s that all about?

The Minutemen were a group of civilians who patrolled the U.S.-Mexico border in an effort to stop people from crossing into the United States illegally. (We won’t take a position on whether they were "vigilantes," as Clinton called them, since that’s a matter of opinion.)

In December, the website BuzzFeed took a look at this largely forgotten episode and found a lot of fuzzy memories -- even by the lawmaker who sponsored the amendment and other Republicans sympathetic to the Minutemen.

According to BuzzFeed, this dates back to a period before the 2006 midterm elections when "an outcry raged in the fringier corners of the immigration debate" that the U.S. government was quietly providing the Mexican government with intelligence about Minutemen patrols. When these concerns reached the halls of Congress, then-Rep. Jack Kingston, R-Ga., introduced an amendment to ease the Minutemen’s concerns."

The article quoted Harel Shapira, a professor of sociology at the University of Texas at Austin and author of a 2013 book on the Minutemen, saying the debate was steeped in conspiracy theories. A statement on a Mexican government website "was interpreted by Minutemen and supporters as the U.S. government collaborating with an enemy state, and putting the lives of patriotic Americans at risk," Shapira said. (We did not hear back from Shapira ourselves.)

Responding during the debate, Sanders assailed Clinton’s effort to link him to the Minutemen, a group unpopular among many Democrats. "No, I do not support vigilantes, and that is a horrific statement, an unfair statement to make," Sanders said.

Still, the Sanders campaign hasn’t given a good explanation about why he affirmatively supported the amendment. Instead, they have focused on making the argument that the amendment was moot, and thus harmless.

"People put forward nuisance amendments all the time," Michael Briggs, a Sanders spokesman told BuzzFeed last December. "In this case, the Customs and Border Patrol said it was a meaningless thing."

The campaign cites comments by then-Rep. Martin Olav Sabo, D-Minn., who was the ranking member on the Homeland Security Committee. "I claim the time in opposition; but, Mr. Chairman, I don’t rise in opposition," he said on the floor, citing comments by customs officials that they already followed the policy outlined in the amendment. "If people want to put it in the bill, I guess that is okay because it apparently does nothing," he said.

Still, as with Clinton’s charge about indefinite detention, her statement about Sanders supporting an amendment favorable to the Minutemen is largely accurate.

The one problem with Clinton’s statement is that she exaggerated the extent to which the measure was backed mainly by hard-line Republicans. The amendment did pass the House with almost universal Republican support, but it did attract a significant minority of the Democratic caucus -- 76 voted for it, while 106 voted against.

Our ruling

Clinton said that in 2006, Bernie Sanders "voted in the House with hard-line Republicans for indefinite detention for undocumented immigrants, and then he sided with those Republicans to stand with vigilantes known as Minutemen who were taking up outposts along the border to hunt down immigrants."

Clinton may have boiled down the substance of the measures a bit too much, but her accounting is largely accurate -- importantly, in her claim that Sanders voted for both measures. That said, Clinton glosses over the degree to which Democrats -- and not just Republicans -- supported both measures. We rate the claim Mostly True.