American political experts say it will be difficult to change the country’s immigration laws after the unexpected defeat of a top Republican in a primary election this week.

Eric Cantor is the majority leader of the Republican-controlled House of Representatives. He had supported legislation that would have permitted the children of illegal immigrants to stay in the United States and one day become citizens.

But Tuesday he was defeated for the party’s nomination by a college professor named David Brat. Mr. Brat had claimed that Mr. Cantor’s beliefs on immigration would permit people who entered the country illegally to stay.

Even though Mr. Cantor had strongly opposed the policies of President Obama, Mr. Brat said he was more conservative than Mr. Cantor.

Mr. Cantor spent fifty times the amount of money Mr. Brat spent in the primary election in the mid-Atlantic state of Virginia. But Mr. Brat told his supporters that money was not important.

“The reason we won this campaign — if there’s just one reason — and that’s because dollars do not vote — you do. This campaign was about just basic American values and virtues right from the beginning. And the basic premise is power belongs to the people and that’s what we’re gonna do.”

Conservative Republicans strongly oppose changes in immigration laws supported by Mr. Obama. Last year, the Democrat-controlled Senate approved major changes to the country’s immigration laws. But the Republican-controlled House has not taken action on the changes.

Some experts believed the House might approve an immigration bill in the next two months. With Cantor’s defeat, they now said conservative lawmakers would be even more strongly opposed to changes in the immigration laws. One of the changes would have given citizenship to the estimated 11 million people now living in the United States illegally.

There are many differences between Republicans and Democrats over immigration, and the disputes are often angry. Experts believe Mr. Obama was re-elected in 2012 in part because he received many votes from Hispanics. The experts say Hispanics’ strong and deep support for Democrats could help the party’s candidates succeed in future national elections.

Most conservative Republicans say the United States should first make it impossible for people to enter the country illegally from Mexico. They believe that only then should the country make changes to its immigration laws.

I’m Christopher Cruise.