Rep. Xavier BecerraXavier BecerraAnti-abortion clinics take First Amendment case to Supreme Court Court: EPA broke law with smog rule delay A Sanders-Warren ticket could win big in 2020 MORE (D-Calif.) on Wednesday said he’s still confident Congress will pass immigration reform despite House Majority Leader Eric CantorEric Ivan CantorGOP sees McCarthy moving up — if GOP loses the House Feehery: The governing party 'Release the memo' — let's stop pretending that Democrats are the defenders of the FBI MORE’s (R-Va.) primary loss

“I think people made a big mistake that they confuse the result in Eric’s race with getting immigration reform done. The question for immigration reform is not if it’s going to get done, it’s when we’re going to get it done. It’s going to get done,” Becerra said on MSNBC’s “Morning Joe.” 

After Cantor’s shocking upset Tuesday night, many analysts predicted prospects for reform are dead in the near future. Cantor had authored a bill similar to the DREAM Act, which would provide a path to citizenship for children who came to the United States illegally. 

“I believe what we’re hearing here is a message: get your work done,” Becerra said of Cantor’s loss. “The longer they let this simmer, the worse it will get in their party.” 

Majorities of Republicans throughout the country support immigration reform, Becerra said, as do most Republicans in the House. 

“For Republicans in the House, my sense is they’re now squeezed between doing things the Tea Party way and doing things the American way. They’re going to find it’s a lot harder to do things the Tea Party way.” 

At the same time, Becerra realizes establishment Republicans are in a bind.

“You can’t outright the far right and maybe Eric’s loss is a message of that.”