When Ruth Bader Ginsburg died on Friday, NPR reporter Nina Totenberg was among the first to break the news. Not surprising: Totenberg is one of the most accomplished chroniclers of the Supreme Court, covering it for all of the associate justice’s 27-year term and beyond.

Totenberg had another reason for being on top of the news: She was a long and close friend of Ginsburg. The relationship dated back to the 1970s when Ginsburg was a pioneering feminist lawyer. The Ginsburg and Totenberg families shared dinners and celebrations together. Ginsburg even presided over Totenberg’s wedding to her second husband, David Reines.

The relationship raises an old journalistic question: Can a reporter, committed to neutrality and balance, fairly cover a public figure with whom they have a close friendship? Does such a relationship present a conflict of interest, or the appearance of one, that might lead readers, viewers or listeners to question whether a reporter is slanting his or her presentation to favor a friend?

Traditional journalistic practice is to avoid such entanglements, or at least disclose them so that readers can judge for themselves. Totenberg and NPR rarely did the latter; her friendship with Ginsburg was almost never mentioned in the hundreds of news stories, interviews and features Totenberg has done about the court over the years. Her most detailed mention of it was in a warm appreciation of her friend published a day after her death.

In an interview, Totenberg dismissed concerns that her closeness with Ginsburg — and similarly with the late justice Antonin Scalia — was in any way compromising to her journalism. Instead, she argues that NPR’s listeners benefited from them because her friendships gave her greater insight into and understanding of the justices’ motivations and thinking, which she then conveyed in her reporting.

“It’s my job to learn as much as I can about the people I cover,” she said. “You’re supposed to know them and understand them as much as you possibly can. . . . It’s a great benefit to me as a reporter and my listeners. And [the two friendships] were a great benefit to me as a human being.”

Totenberg said it came down to setting “boundaries” that separated the personal from the professional. She cited an interview she had with Ginsburg in 2016 after the jurist had criticized then-candidate Donald Trump, stirring up a backlash. Totenberg said Ginsburg regretted the comments and asked the journalist not to ask her about them; Totenberg said she told Ginsburg that she had to and that it would be irresponsible if she didn’t ask.

“You can have an arm’s-length relationship [as a reporter] and still be a friend,” she said. “You can do both.”

Some journalists don’t see it that way.

“While it’s one thing to occasionally have coffee or lunch or drinks with someone you cover to further develop that source, the friendship between Totenberg and Ginsburg went far beyond that,” wrote Tom Jones, senior media writer of the Poynter Institute, a journalism education organization, in his daily newsletter on Monday.

The problem with the “appearance” of a conflict, Jones noted, is that readers and listeners can’t say whether the personal relationship had any affect on Totenberg’s decisions about what to cover or ignore. What’s more, he wrote, the relationship furthers the cynical public view that the news media is “in cahoots” with the people they cover, especially liberals.

“The friendship should not have happened,” concluded Jones. “Or if the friendship was that important, Totenberg should have recused herself from covering Ginsburg or the Supreme Court. In addition, NPR should have an issue with the relationship between Totenberg and Ginsburg, which was no secret.”

In a statement, NPR spokeswoman Isabel Lara said Totenberg’s friendship with Ginsburg “started decades before she became a Supreme Court justice and developed over the years that she covered her career and the Supreme Court.” Lara cited NPR’s ethics handbook, which says reporters should not allow sources to dictate coverage decisions. But she declined to address whether such reporter-source relationships are acceptable at NPR or whether NPR should disclose them.

A key issue in any source-reporter relationship is what editors know about the relationship and whether they are informed enough to question the reporter’s presentation of the facts, said Leonard Downie Jr., the former executive editor of The Washington Post and now a journalism professor at Arizona State.

But the next step is letting the public know what the editors know, he said. Totenberg’s relationship with Ginsburg “creates an appearance [of conflict] question,” said Downie, whose just-published memoir, “All About the Story,” recounts his years running The Post’s newsroom. “On the face of it, I’m uncomfortable with it. I’d have to think about removing a reporter from the beat” under similar circumstances. “At the very least, it should be disclosed.”

Downie’s predecessor at The Post, Ben Bradlee, faced similar questions about his relationship with John F. Kennedy and his wife, Jacqueline. Bradlee became friends with Kennedy in the late 1950s when Bradlee was a top correspondent for Newsweek and Kennedy was a senator. The relationship carried over to Kennedy’s term in the White House.

Although Bradlee reflected on the relationship several times after Kennedy’s death, it became an issue during Bradlee’s tenure as editor in the early 1970s. When The Post began breaking stories about the Watergate burglary and related crimes and coverups by the Nixon administration, President Richard Nixon and his representatives cited Bradlee’s relationship with Kennedy as evidence that the newspaper was biased. Nixon was Kennedy’s opponent in the 1960 presidential race.

While Downie strongly defends Bradlee’s impartiality and The Post’s reporting, he said the Bradlee-Kennedy friendship could lead readers to raise questions. “They might ask if there was something [Bradlee] didn’t report or disclose because of his friendship,” he said. “It raises issues.”