WASHINGTON — An Internal Revenue Service whistle-blower filed a complaint alleging that senior Treasury officials tried to exert influence over the mandatory audit of President Trump’s tax returns, according to a person familiar with the matter.

The whistle-blower came forward to Congress in July with the complaint, which accuses political appointees in the Treasury Department of improperly involving themselves in the audit and putting pressure of some kind on senior officials in the I.R.S. Additional details about the specific allegations in the complaint remained unclear, including when the reported activity took place.

The allegation comes as Mr. Trump is locked in a legal battle with Congress, where House Democrats have sought to obtain six years’ worth of his personal and business tax returns. Treasury Secretary Steven Mnuchin has refused a congressional request to release the returns and Mr. Trump has declined to release them despite decades of precedent that presidents make their tax information public.

In August, Representative Richard E. Neal of Massachusetts, the Democratic chairman of the Ways and Means Committee, alerted Mr. Mnuchin to the existence of the whistle-blower, who he said put forth “credible allegations of ‘evidence of possible misconduct’ — specifically, potential ‘inappropriate efforts to influence’ the mandatory audit program.”