WASHINGTON — He wasn’t supposed to be here, back in one of his favorite haunts, a second-floor Chinese restaurant just steps from the marble halls of power.

But Representative John Tierney, the Salem Democrat many politicos had once written off, was indeed back on Capitol Hill, and back at Hunan Dynasty, where the walls are lined with photographs of the politicians who frequent it. As he dined on chicken lo mein, he spoke animatedly about the education bill he was about to introduce.

Having survived the most brutal campaign of his 16-year congressional career in one of the country’s highest-profile House races, an embittered but grateful Tierney said he is relieved to be back and eager to move forward. He is crafting legislation related to gun control, making college more affordable, and workforce training. “I got an opportunity,” he said. “I don’t want to be distracted worrying about the past.”

Dogged by the legal troubles of his wife’s brothers, Tierney eked out a ninth term by a 1 percent margin, the slimmest victory since winning his seat in 1996.

After one of Tierney’s brothers-in-law was sentenced last summer to three years in prison for his role in a multimillion-dollar offshore gambling ring, the man accused Tierney of knowing all about the illegal operation, a charge the lawmaker has repeatedly denied.

Tierney, who has never been implicated of any crime, said he knew nothing about the illegal nature of the gambling enterprise run out of another fugitive brother-in-law’s Antigua home. Now Tierney feels at ease enough to joke about the matter. In January, after he was sworn in, Tierney and his wife took a weeklong vacation to recover from the campaign stress at their timeshare in the Bahamas. “No, not Antigua,” he said, rolling his eyes, “though I hear it's a beautiful island.”

Tierney’s wife, Patrice, — whose divorce he handled as an attorney and to whom he has been married for 15 years — had admitted to “willful blindness” in 2010 in helping one of her brothers file false tax returns while managing millions he made in illegal gambling income. She served a month in prison, a time Tierney described as particularly trying.

The saga played out in print and over airwaves, heavily financed by Republican super PACS who saw Tierney’s seat as particularly vulnerable and former state senator Richard Tisei as a strong candidate to unseat him. “It was difficult for my wife, so consequently it was very hard for me,” said Tierney, 61. “Others may have seen it as an assault on me, but they were using her as a bludgeon.”

Many Democrats also discounted Tierney. Pessimistic about his chances of overcoming the attacks, some had already begun strategizing about who might run against Tisei in 2014.

“A lot of people urged him not to run, thinking he couldn’t win,” said former representative Barney Frank, who had worked closely with Tierney on fishing issues and waste in military spending and had campaigned for him in Gloucester. “He was clearly aware he could lose it, but he was more confident than a lot of other people.”

Several Washington watchdog groups have called for a House ethics investigation into the $24,000 a year in unreported income that Tierney’s wife received for managing her brother’s accounts and taking care of his children, money the Tierneys have deemed a gift that did not warrant reporting for taxes.

Tierney said neither he nor his office has been contacted by the ethics committee, which would not confirm or deny whether an investigation has been launched.

In the meantime, Tierney said he is slipping comfortably back into the collegial, congressional routine he knows so well, finding support among both Democrats and Republicans.

“People on both sides of the aisle had nice comments to make that I’m back,” Tierney said. “They knew it was a difficult scenario.”

He would not name names, for fear that if he identified a Republican as being supportive, that person would pay a price and “be treated badly” by GOP colleagues.

On Friday, Tierney, who serves on the House Education and Workforce Committee, introduced a bill to help workers find jobs by connecting businesses and community colleges to improve training and education.

Representative George Miller, a California Democrat and ranking member of the committee, said he called Tierney earlier this month asking him to introduce legislation that would seek to make colleges more accountable for their use of federal funds by making their costs more transparent. Tierney, having just survived “hand-to-hand combat” in his campaign, was the man for the job, said Miller, who told him, “You’re the alley cat here. You can go up and fight these guys on these issues of transparency and try to rein in the cost of college.”

Michael Goldman, a Democratic consultant and one of Tierney’s closest friends since they met in their 20s at Salem State University, said Tierney is “more comfortable and calmer now than I’ve seen him since this horrific thing started. He no longer has to have hanging over his head, ‘Oh my God, what do people really think about me? Do they trust me? Do they want me?’ Election Day answered that question. He knows he’s had this fight and he’s won. That can’t help but give you confidence.”

Tierney reflected in the interview last week on the uncertainty of election night, when he and his wife awaited results with family and friends in their usual suite at the Hawthorne Hotel in Salem. Even when supporters started calling to congratulate him, Tierney said, he hesitated to declare victory.

As Tierney finished his meal, the restaurant owner tapped him on the shoulder. “How are you, boss? Good to see you,” she said.

It was nothing special, the kind of exchange that happens countless times on Capitol Hill, but the congressman nodded and smiled.