When Representative John Tierney’s wife pleaded guilty in 2010 to charges of helping her brother falsify his tax filings, it was an unsettling October surprise for the Salem Democrat. But Tierney’s Republican opponent at the time, Bill Hudak, could not capitalize. A far-right candidate dogged by image problems of his own — like publicity about a sign he once put on his lawn comparing Barack Obama to Osama bin Laden — Hudak lost by a wide margin.

But Tierney’s bid for a ninth term has been far more difficult. Patrice Tierney’s legal proceedings generated a stream of potentially damaging headlines, and the congressman is facing a far more formidable opponent this year.

Richard R. Tisei, a 49-year-old Republican real estate agent, is a moderate with 26 years in the state Legislature and the full backing of his party. And unlike Tierney’s last challenger, Tisei ran a major campaign before.

Observers say the race is shaping up to be the state’s most competitive House election this year, more so than the highly publicized contest between Joseph Kennedy III and a field of others to fill the seat vacated by longtime Democratic congressman Barney Frank.

Tisei raised $311,000 in his first two months in the race, and Republicans at the national level have named Tierney their top target in the all-Democratic House delegation. Democrats are acknowledging concern. Both sides have been gathering reams of opposition research.

Tierney, who has won reelection comfortably in the past, largely has been playing defense. Patrice Tierney was sentenced last January to a month in prison and five months of house arrest after pleading guilty in US District Court in Boston to helping her brother, Robert Eremian, falsify his tax filings. She admitted to “willful blindness’’ in not reporting his gambling operation in Antigua. Last year, Patrice Tierney testified in the trial of her other brother, Daniel Eremian, who was convicted in December of racketeering and gambling charges related to the offshore operation.

A federal judge has said there was no evidence that John Tierney knew the Eremian brothers were running an illegal gambling operation, but publicity of the case has provided ample campaign fodder.

PAT GREENHOUSE/GLOBE STAFF

The GOP’s Richard Tisei is expected to give eight-term Representative John Tierney, a Democrat, a tougher race than he faced in 2010.

The National Republican Congressional Committee this month launched a website called “How Could Tierney Not Know?’’ Each day, it trickles out a new question about his wife’s legal troubles, including asking why Patrice Tierney refused to answer questions about her husband, invoking spousal privilege, when she testified at her brother’s criminal trial. The website has prompted local reporters to ask Tierney questions about the legal troubles nearly every day.

Over coffee at a diner in Danvers recently, Tierney reasserted that he did not know about the gambling operation. He said that his wife testified under advice from her attorney when she invoked the spousal privilege, probably under the belief that the prosecutor was playing to the media during questioning.

Tierney was eager to change the subject, insisting voters, by reelecting him in 2010, made clear they do not hold his wife’s problems against him.

“I don’t talk to a single soul that asks me about this,’’ he said.

Voters, he said, are more concerned with jobs, the preservation of Medicare, Iran’s pursuit of nuclear arms, and other issues.

Republicans “can’t win on the issues, and I think Mr. Tisei knows that,’’ he added.

Tierney, 60, has kept a lower profile than some members of the state’s congressional delegation. The Salem native, who worked his way through Suffolk Law School as a janitor in the State House, said higher-education affordability has been his passion, pointing to several bills he helped craft to improve access for poor and middle class families, amid a list of broader legislative accomplishments.

Steve Israel the Democratic Congressional Campaign Committee chairman, this month warned Washington lobbyists that Tierney has “an even tougher race’’ than many of his colleagues, according to Politico, which cited an unnamed lobbyist who heard the remarks.

Tisei, who led the tiny Republican caucus in the state Senate for four years, is pitching himself as an independent who can work across party lines in the mode of Scott Brown, who served with him on Beacon Hill before going to the US Senate in 2010. Tisei gained a measure of statewide recognition when he ran for lieutenant governor in 2010, as Charles D. Baker’s running mate. The pair lost to Governor Deval Patrick and Lieutenant Governor Timothy P. Murray.

“I’m a live-and-let-live Republican,’’ Tisei said in an interview. “I think the government should get off of your back, out of your wallet, and away from the bedroom.’’

If elected, Tisei would be the first gay Republican in the US House to come out before entering Congress.

Democrats have tried to undermine Tisei’s moderate reputation and paint him as a foot soldier for national congressional leaders, who are unpopular in opinion polls. They have noted that he is courting the Tea Party movement, addressing the Greater Boston group last week.

Tisei has been endorsed several times by abortion rights groups in his state Senate races and is regarded as moderate on social issues.

But he recently called the Tea Party a “godsend’’ and said in a follow-up that he understands where the movement “is coming from with regard to spending, debt, overregulation, and the growth of government.’’

But he does not believe that government is a bad thing, he said.

“His reputation was that of someone who could be pragmatic and work with both sides toward a compromise,’’ said Steven C. Panagiotakos, a former Democratic state senator from Lowell who was the chamber’s lead budget writer.

The district, which includes Essex and parts of Middlesex counties, has the makings of a competitive race in a state that offers few opportunities for Republicans.

It was held by Republican Peter G. Torkildsen before Tierney defeated him in 1996, and grew slightly more conservative when the towns of Billerica, Tewksbury, and parts of Andover were added this year.

Brown won the district with 63 percent of the vote in his 2010 special election victory, and Baker and Tisei took about 51 percent of the vote there.

But in presidential elections, Democrats John Kerry and Barack Obama both won with about 56 percent of the vote.

“It’s a tough race, obviously, because of the publicity about Patrice, who I think is being unfairly treated,’’ Frank said.

But Frank said he believes Tisei will not be able to overcome the national party’s low standing in Massachusetts.

“He’s not running as just an individual. He’s running as a guy who’s going to vote to keep [John] Boehner as speaker,’’ Eric Cantor as majority leader, and Paul Ryan as head of the budget writing committee, Frank said.