Gwen Ifill, the longtime co-host of PBS’s NewsHour and Washington Week, and one of the most prominent black journalists in the country, died Monday.

The 61-year-old veteran anchor had been in hospice care. In a statement Monday, PBS reported that the cause of death was cancer.

In her long career, mostly covering Washington, Ifill covered seven presidential campaigns and moderated the vice presidential debates in 2004 and 2008. She was also the best-selling author of “The Breakthrough: Politics and Race in the Age of Obama.”

During his news conference Monday afternoon, President Barack Obama offered condolences and called Ifill a powerful role model.

“I always appreciated her reporting even when I was on the receiving end of one of her tough interviews,” Obama said. “Gwen did her country a great service.”

Ifill was the moderator and managing editor of Washington Week and the co-anchor and co-managing editor, of PBS NewsHour with Judy Woodruff. With both roles, she became one of the first black journalists to preside over a major national political show.

“Gwen was a standard bearer for courage, fairness and integrity in an industry going through seismic change,” said Sara Just, PBS “NewsHour” executive producer. “She was a mentor to so many across the industry and her professionalism was respected across the political spectrum. She was a journalist’s journalist and set an example for all around her.”

Response to her death was swift in the journalism world.

“Gwen was a transformative voice among journalists. Her professionalism and poise, coupled with an innate doggedness to report the story, reverberated throughout the industry,” said National Association of Black Journalists President Sarah Glover. “Gwen covered politics and the presidential race with class, wisdom and insight, separating her from the pack.”

Ifill was inducted into the NABJ Hall of Fame in 2012. On Wednesday, she was scheduled to receive the 2016 John Chancellor Award from Columbia University.

“Gwen was the platinum standard for political journalists and she was such an inspiration to African-American women in the business,” said Washington Post reporter and former NABJ President Vanessa Williams. “She was a tough, smart reporter, with a warm, generous spirit who never hesitated to help, financially and with her time and talents, when asked, whether by NABJ or by a student who approached her for a few words of advice and a selfie.”

NBC Today co-host Tamron Hall, counted Ifill as a mentor.

“Heartbroken to learn Gwen Ifill has passed away,” Hall tweeted. “She was my hero, a woman who deserved all the praise she received. Honest and true.”

A political mainstay, Ifill was noticeably absent from the air for much of this season’s contentious presidential race.

In 2004 she moderated the vice-presidential debate between Dick Cheney and John Edwards.

And in 2008 she moderated the vice-presidential debate between Joe Biden and Sarah Palin, where Palin famously said: "I may not answer the questions the way the moderator and you want to hear."

Shortly before moderating the 2008 debate, Ifill brushed aside concerns that she might not be fair because she was writing a book about Obama.

“I’ve got a pretty long track record covering politics and news, so I’m not particularly worried that one-day blog chatter is going to destroy my reputation,” she told The Associated Press then.

Ifill also questioned why people would assume her book would be favorable toward Obama. “Do you think they made the same assumptions about Lou Cannon (who is white) when he wrote his book about Reagan?” she said.

Afterward, Ifill was immortalized on “Saturday Night Live,” by Queen Latifah.

She last moderated a primary debate between Sen. Bernie Sanders and Hillary Clinton earlier this year.

Born in New York City, her father, Urcille Ifill, was a Panamanian African Methodist Episcopal minister of Barbadian descent, and her mother, Eleanor Ifill, was from Barbados.

In 1977 she graduated from the all-women’s Simmons College in Boston before starting her career as a newspaper reporter for The Boston Herald-American, although a year earlier, in the summer of 1976, while she was interning at the paper, a fellow staffer left her an ominous note: "(N-word), go home."

Ifill would go on to work for the Baltimore Evening Sun, The Washington Post as a national political reporter and The New York Times as a White House correspondent before moving to television to work for NBC. In 1999 she became the moderator of PBS’s “Washington Week in Review.”

In 2013 Ifill was named co-host of the PBS NewsHour.

The Associated Press contributed to this article.