WASHINGTON — A senior adviser to Hillary Clinton’s 2008 presidential campaign who was accused of repeatedly sexually harassing a young subordinate was kept on the campaign at Mrs. Clinton’s request, according to four people familiar with what took place.

Mrs. Clinton’s campaign manager at the time recommended that she fire the adviser, Burns Strider. But Mrs. Clinton did not. Instead, Mr. Strider was docked several weeks of pay and ordered to undergo counseling, and the young woman was moved to a new job.

Mr. Strider, who was Mrs. Clinton’s faith adviser, was a founder of the American Values Network and sent the candidate scripture readings every morning for months during the campaign, was hired five years later to lead an independent group that supported Mrs. Clinton’s 2016 candidacy, Correct the Record, which was created by a close Clinton ally, David Brock.

He was fired after several months for workplace issues, including allegations that he harassed a young female aide, according to three people close to Correct the Record’s management.

Mr. Strider did not respond to multiple requests for comment.

Those familiar with the accounts said that, over the years, a number of advisers urged Mrs. Clinton to sever ties with Mr. Strider, and people familiar with what took place did not want to see Mrs. Clinton blamed for the misconduct of men she was close to.

The complaint from the young woman was initially brought to Jess O’Connell, who was the national director of operations for the Clinton campaign.

Ms. O’Connell, who is currently the chief executive officer of the Democratic National Committee, handled the investigation and advised the Clinton campaign manager, Patti Solis Doyle, that Mr. Strider should be fired, according to three people familiar with the events.

Ms. O’Connell told colleagues that she was concerned that the young woman making the allegations should not be demoted when she was moved from Mr. Strider’s supervision. The woman requested to have no more interactions with Mr. Strider, and she was moved to a different job within the campaign, reporting directly to Mike Henry, the deputy campaign manager.

The investigation into Mr. Strider’s conduct was described as brief, but it included a review of a number of emails he sent the young woman, who had shared an office with him.

A spokesman for Mrs. Clinton provided a statement from Utrecht, Kleinfeld, Fiori, Partners, the law firm that had represented the campaign in 2008 and which her advisers said has been involved on sexual harassment issues.

“To ensure a safe working environment, the campaign had a process to address complaints of misconduct or harassment. When matters arose, they were reviewed in accordance with these policies, and appropriate action was taken,” the statement said. “This complaint was no exception.”

Late Friday night, more than a day after The New York Times reached out to her aides for comment, Mrs. Clinton posted on Twitter that she was “dismayed when it occurred.”

Mrs. Clinton did not address why she ignored advisers’ recommendations that she fire Mr. Strider.

The woman’s experience and the reaction to it have not been previously reported. Until now, former Clinton associates were unwilling to discuss the events for publication.

But that changed after the start of the #MeToo movement, in which dozens of men across the country and across different industries have been fired or suspended for sexual misconduct.

This account was based on interviews with eight former campaign officials and associates of Mrs. Clinton’s.

They said that Ms. Solis Doyle, the campaign manager, and other senior campaign officials discussed the situation involving Mr. Strider and Mrs. Clinton’s response at the time. Some of them were troubled that he was allowed to remain on the campaign.

The complaint against Mr. Strider was made by a 30-year-old woman who shared an office with him. She told a campaign official that Mr. Strider had rubbed her shoulders inappropriately, kissed her on the forehead and sent her a string of suggestive emails, including at least one during the night, according to three former campaign officials familiar with what took place.

The complaint was taken to Ms. Doyle, the campaign manager, who approached Mrs. Clinton and urged that Mr. Strider, who was married at the time, be fired, according to the officials familiar with what took place. Mrs. Clinton said she did not want to, and instead he remained on her staff.

Ms. Doyle was fired shortly after that in a staff shake-up in response to Mrs. Clinton’s third-place finish in the 2008 Iowa caucuses. And Mr. Strider never attended the mandated counseling, according to two people with direct knowledge of the situation.

The woman who made the accusation against Mr. Strider in 2008 has not spoken publicly about it. She, like most campaign staff members, signed a nondisclosure agreement that barred employees from publicly discussing internal dynamics on the campaign, according to two people with direct knowledge of the contract. Reached by a reporter, she declined to comment.

Ms. Solis Doyle also declined to comment.

Mrs. Clinton’s candidacy has been cited as an inspiration for the #MeToo movement, but she has not played a visible role in it. After several Hollywood actresses told The Times and The New Yorker that Harvey Weinstein, a longtime friend and donor to the Clintons, had harassed or assaulted them, Mrs. Clinton spoke out against his behavior, saying in a statement that she was “shocked and appalled by the revelations.”

Weeks later the actress Lena Dunham, one of Mrs. Clinton’s most visible celebrity supporters in her 2016 presidential bid, told The Times that she warned two Clinton campaign aides against associating with Mr. Weinstein. “I just want you to know that Harvey’s a rapist and this is going to come out at some point,” Ms. Dunham said she told the campaign.

Nick Merrill, the communications director for Mrs. Clinton, said at the time Ms. Dunham spoke publicly that she was mistaken. “As to claims about a warning, that’s something staff wouldn’t forget,” he said.

A version of this article appears in print on , on Page A13 of the New York edition with the headline: Clinton Opted to Shield Adviser Accused as Harasser. Order Reprints | Today’s Paper | Subscribe