Pete Buttigieg’s 2020 campaign is returning thousands of dollars in donations from two top Washington lawyers who represented Brett Kavanaugh in his controversial confirmation hearing, saying it will not accept funds from people who helped secure the justice’s seat on the supreme court.

Buttigieg’s campaign received $7,200 from Alexandra Walsh – $3,150 of which had already been returned because it exceeded limits – and attended a fundraiser in July that was co-hosted by the Washington lawyer. Buttigieg also received $2,800 from Beth Wilkinson, Walsh’s law partner, who also represented Kavanaugh.

When asked by the Guardian about the donations, the campaign said it had overlooked the lawyers’ role in the Kavanaugh confirmation and had made a mistake in accepting the donations.

It said: “With nearly 700,000 donors, a contribution we would otherwise refuse sometimes gets through. We believe the women who have courageously spoken out about Brett Kavanaugh’s assault and misconduct, and we thank the Guardian for bringing this contribution to our attention.”

A spokesperson added: “[Kavanaugh] should have never been put on the supreme court and this campaign will not accept donations from those who played a role in making that happen. Accordingly, we will be returning this contribution and others from this firm.”

Walsh and Wilkinson are frequent donors to Democratic causes. During this 2020 election cycle, Wilkinson has donated $1,000 to the California senator Kamala Harris’s campaign and $2,800 to the Colorado senator Michael Bennet’s campaign. Wilkinson also gave $2,800 to the New York senator Kirsten Gillibrand, who has since dropped out of the race and has been an outspoken critic of Kavanaugh.

The Washington law firm Wilkinson Walsh Eskovitz represented the then nominee for the supreme court after Christine Blasey Ford accused him of sexually assaulting her when both were high school students in suburban Maryland. Walsh and Wilkinson led the charge defending Kavanaugh, even as more accusations of sexual misconduct were unearthed, and painted the judge as the victim of an “outrageous” campaign.

In one case, Wilkinson questioned why women who accused Kavanaugh of assault had not immediately gone to the police to report alleged assaults, instead of members of Congress, and insisted that Kavanaugh treated women with dignity and respect.

The judge has denied all of the allegations against him.

In another case, Walsh sought to downplay comments that were made in Kavanaugh’s high school yearbook. When the New York Times reported that Kavanaugh was listed as a member of the “Renate Alumni” – a reference to a classmate from a neighbouring Catholic girls’ school that appeared to insinuate sexual conquest – Walsh was quoted in a statement as saying that Kavanaugh had been friends with Renate in high school and had “admired her very much”. She also stated that the two had once shared a “brief kiss goodnight”.

When asked about the reference, Renate Dolphin told the New York Times that the insinuation in Kavanaugh’s yearbook was “hurtful and simply untrue”. She also denied Walsh’s assertion that she and Kavanaugh had ever kissed.

Walsh did not respond to a request for comment about the Buttigieg campaign’s decision to reject her donations. Wilkinson did not immediately respond to a request for comment.

The Harris and Bennet campaigns did not return a request for comment on the donations they received from Wilkinson. Gillibrand’s office also did not return a request for comment.

The Buttigieg campaign has been a vocal critic of Kavanaugh and has said that, if elected, he would choose a supreme court justice similar to Ruth Bader Ginsberg, who shared his “progressive values”.