Rep. Carolyn McCarthy (D-N.Y.) reflects on her 18-year congressional tenure and why she believes her decades-long fight to curb gun violence was not in vain. (Jackie Kucinich and Julie Percha/The Washington Post)

Turn on television news programs after any major mass shooting and eventually Carolyn McCarthy shows up as an expert guest. After Columbine, Virginia Tech, Aurora and Newtown, she appeared to remind viewers of the scourge of gun violence, to beg for reforms and to serve as a foil for the gun rights movement.

Her appeals rarely worked.

But back in the day, “I was the only one who would go on TV” to discuss gun control, she said. Critics accused her of exploiting the tragedies for political gain. “You know what? No,” she said. “Because you only call me when there’s a tragedy. Call me when there isn’t a tragedy and I’ll talk about it. . . . It wears you out. But if I didn’t do it, who would?”

McCarthy (D-N.Y.), 70, is preparing to step down after nine terms in Congress — a stretch that she never wanted or expected.

“I didn’t take into consideration — because I knew nothing about politics — how long things take around here,” she said in a recent interview.

Carolyn McCarthy, who is retiring at the end of this congressional year after 18 years in the House, meets with her staff on Capitol Hill on Nov. 12. (Melina Mara/The Washington Post)

A 1993 shooting on a Long Island Rail Road commuter train left McCarthy’s husband dead and her son gravely injured. Within days, McCarthy, a nurse by training, captured the nation’s attention with her raw, emotional criticism of the gun lobby. Democrats eager to grab her Long Island district persuaded her to run for Congress in 1996.

“She’s sort of a ‘Mrs. Smith Goes to Washington’ character,” said Sen. Charles E. Schumer (D-N.Y.), who was a Brooklyn congressman when he met McCarthy. “The instant I met her, I knew she’d be great because she’s so genuine.”

Schumer said that allies and enemies alike respected McCarthy’s gun control advocacy because “they know what she was saying was straight from the people. She never got fancy, she never got too serious about herself.”

Even the National Rifle Association, her chief antagonist on Capitol Hill, declined to criticize her one last time as she prepares to leave.

“The NRA very rarely — if ever — agreed with Rep. McCarthy on firearm policy issues,” lead spokesman Andrew Arulanandam said in an e-mail. “Nonetheless, we sincerely wish her all the best in her retirement.”

McCarthy is retiring amid significant setbacks for the gun control movement. After a shooter killed 20 students and six staff members at an elementary school in Newtown, Conn., in December 2012, a months-long bipartisan push to expand the national gun background-check program abruptly failed in the Senate last year. So did legislation to reinstate the federal ban on semiautomatic assault weapons.

Angered by the opposition, President Obama and gun control advocates vowed to defeat intransigent lawmakers, but the threats rang hollow. Even Rep. Ron Barber (D-Ariz.) — the former chief of staff to former representative Gabrielle Giffords (D-Ariz.), who also was injured when the former lawmaker was shot and gravely wounded in January 2011 — is on the verge of losing his seat if he comes up short in a recount, despite the support of gun control groups.

But McCarthy insists that the gun control movement is stronger than ever.

“I do believe that in time — and everything around here takes a long, long time — that we’re going forward,” she said.

She is heartened by the decision in some state courts to hear legal challenges to gun laws. And she, like other gun control activists, cheered election results in Oregon, where two state senators lost to challengers seeking new gun restrictions, and Washington state, where voters approved plans to expand the state’s background-check program.

“We will never do away with gun violence to a certain extent in this country,” she said. “But looking at things like a nurse — you can’t save every patient — that doesn’t stop you from trying and doing your job to save the next patient.”

McCarthy said she is at peace with her decision to take a less active role in the public debate because several other people have emerged to lead the movement. She cited Giffords and Connecticut Sens. Richard Blumenthal (D) and Chris Murphy (D). She’s grateful for the financial support that former New York mayor Michael R. Bloomberg (I) is giving gun control groups, and she is excited by newer groups established in response to recent shootings.

In a statement, Giffords said McCarthy “is an example of the impact women can have in politics. Bravely, she took a horrific personal tragedy and found in it a call to service. And she has delivered.”

Bloomberg called her “a great ally for mayors around the country who sought help from the federal government in fighting gun violence.”

Shannon Watts, founder of Moms Demand Action for Gun Sense in America, started her group in her Indiana kitchen after the Newtown shooting. She said McCarthy “has been an inspiration to moms everywhere and to myself personally,” adding later that the congresswoman is “a thought leader and role model.”

Giffords, Watts and others cited what they think is McCarthy’s most significant gun control achievement, a modest 2007 measure that provides money for states to collect and maintain records on the mentally ill and add them to the national background-check database. The law imposed penalties on the states if they didn’t comply. It passed quickly in the wake of the Virginia Tech shootings after she partnered with moderate Democrats, Republicans and the NRA to ensure support.

The bill fell far short of her most ambitious goals, but she considers the day that it passed as her best on the job. President George W. Bush invited McCarthy to the White House to watch him sign the bill, but aides declined to arrange a public ceremony.

“I understand why his staff didn’t want a photo,” McCarthy recalled. “I said, ‘I don’t need a photo, I just want to know that after all these years, I accomplished one thing that I was trying to do.’ ”

Her partnership with the NRA was fleeting, as the group repeatedly tried to unseat her. GOP opponents always faulted McCarthy for being an unsuccessful, one-issue lawmaker. It never worked, and now McCarthy is leaving on her own terms.

“Every election, they said I was a one-issue candidate and they never learned,” she said. “There’s no such thing as a woman having just one issue. And I think I proved that.”