Conservative activists are targeting House Speaker Paul D. Ryan for a primary challenge next year as retribution for the massive spending bill the Wisconsin Republican ushered through Congress at the end of the recent session.

The effort is spearheaded by Wisconsin tea party groups and pro-life activists, who feel betrayed by Mr. Ryan’s nearly $2 trillion package.

The spending bill avoided a government shutdown by surrendering on conservatives’ top priorities, including giving up the fights to defund Planned Parenthood and to block President Obama’s plan to bring at least 10,000 Syrian refugees to the U.S.

PHOTOS: Conservatives in Hollywood: Celebrities who lean right

The hunt is on to find a suitable conservative candidate who can beat Mr. Ryan, who received 94 percent of the vote in the 2014 primary in his district, which sits against the Illinois border in the southeastern part of the state.

“There are people who are seriously looking for that,” said James Murphy, founder of Green Bay Tea Party. “There is a sympathetic ear to having someone beat him.”

The Ryan campaign team in Wisconsin has shrugged off the threats, treating them as mere talk in the absence of a viable candidate to mount a challenge in the district.

PHOTOS: Famous conservatives in professional sports

However, there is precedent for a tea party challenger to topple a member of the House Republican leadership. Eric Cantor, while serving as majority leader, lost his seat in a Richmond, Virginia, suburb in a 2014 primary upset to tea-party-backed Dave Brat.

However, Mr. Ryan’s predecessor as speaker, John A. Boehner, easily defeated a tea-party-backed primary challenger the same year in Ohio. At the time, Mr. Boehner faced widespread opposition from conservatives and a revolt in the House Republican conference, which ultimately prompted him to resign in October.

Mr. Ryan, the 2012 Republican nominee for vice president, did not seek the speakership but was drafted by conservative and establishment members who saw him as a unifying figure who could mend the divide in the conference.

Still, the discontent on the home front for Mr. Ryan is part of ongoing tension between conservatives who want aggressive action to rein in Mr. Obama’s agenda and party leaders who have taken a measured approach.

Ken Crow, a tea party activist in Iowa, gave voice to the dissatisfaction in a blog post calling for a grass-roots uprising to unseat Mr. Ryan.

“If this Omnibus bill is any sort of indication of the way Speaker Ryan is going to govern, it is time to do what ‘Barney Fife’ told us to do so many years ago, ‘NIP-IT, NIP-IT’ in the bud now!” Mr. Crow wrote.

He continued: “All patriots should contact your group leaders and begin organizing nationwide to put down this RINO in order that he is not re-elected to his seat in Wisconsin. The Badger State patriots need to begin soliciting your State Senators, high-profile business leaders or the State Legislators who reside within the 1st District of Wisconsin.”

The fury from conservative activists over the spending package, which renewed popular tax breaks and increased the federal deficit by hundreds of billions of dollars, also was directed at the 150 House Republicans whom Mr. Ryan cajoled into supporting the bill.

Americans for Legal Immigration PAC, which opposes illegal immigration, launched a drive to find primary challengers for all 150 House Republicans who backed the bill.

“These sellout Republicans have made a huge mistake voting for this on top of the huge surge in public anger at DC politicians that have betrayed their constituents,” said William Gheen, president of the political action committee.

The spending bill enraged advocates for a crackdown on illegal immigration by funding so-called sanctuary cities that provide safe harbor for illegal immigrants and failing to rein in Mr. Obama’s executive action to grant deportation amnesty.

Mr. Ryan has defended the bill and his loyalty to the conservative cause.

“The members that asked me to become speaker, that elected me to speaker, know that I come from the conservative movement and that I’m a movement conservative with an eye on the prize, which is actually achieving success,” the speaker said in an interview on NBC’s “Meet the Press” after passage of the bill.

“In divided government, you don’t get everything you want,” he said. “So we fought for as much as we could get. We advanced our priorities and principles. Not every single one of them, but many of them.”