WASHINGTON (AP) — Millions of dollars from anonymous donors are helping shape the fight over President Donald Trump's Supreme Court nominee as Republicans and Democrats undertake a bruising battle for ideological control of the nation's loftiest tribunal.

Even before Trump's announcement Monday that he had picked Brett Kavanaugh, a federal appeals court judge, advocacy groups had begun lining up for and against the nomination and said they would spend heavily to influence the outcome of what's expected to be a tumultuous confirmation process.

One of the most prominent groups on the right, the Judicial Crisis Network, said it's prepared to spend as much as $10 million or more in a pro-Kavanaugh advertising campaign that includes targeting vulnerable Senate Democrats. The liberal Demand Justice has spelled out plans for a $5 million effort to oppose Kavanaugh, beginning with ads aimed at pressuring moderate Republicans.

While the groups' positions on Kavanaugh are clear, their sources of cash aren't.

The anonymity is made possible by federal rules that permit groups structured as tax-exempt social welfare organizations to shield the identities of their benefactors. The upshot is that deep-pocketed donors may wield significant influence without ever revealing who they are, unless they choose to.

Brendan Fischer of the nonprofit Campaign Legal Center said the arrangement is problematic because the public has no way of knowing whether the donors have a specific interest in a matter that may come before the Supreme Court. It also allows the donors to be rewarded by strategically disclosing their donations to people in positions of authority in Washington.

"This secrecy prevents the public from evaluating these messages and keeps legislators from properly weighing the lobbying pressures to which they are subjected," he said.

Demand Justice and the Judicial Crisis aren't the only advocacy groups mobilizing around Kavanaugh's nomination, but they're two of the most visible.

Demand Justice launched stopkavanaugh.com shortly after Trump introduced Kavanaugh on Monday night. The website described his nomination as "the biggest fight of our lifetimes." The Judicial Crisis Network set up confirmkavanaugh.com , calling Kavanaugh "a person of impeccable character, extraordinary qualifications, independence, and fairness."

The Judicial Crisis Network has received robust financial support for years from the Wellspring Committee, an obscure nonprofit founded a decade ago. Conservative activist Neil Corkery is Wellspring's president and sole board member. He previously was treasurer of the Judicial Crisis Network. His wife, Ann Corkery, ran Wellspring before he did, according to federal tax return records.

Both groups are registered as social welfare organizations, which are permitted to engage in limited political activities as long as politics isn't their primary focus. Known by their IRS designation as 501(c)(4)s, they often include civic-minded groups such as homeowner associations and volunteer fire departments.

"Involvement in political campaigns is not social welfare activity," according to the political money website Open Secrets. "But it's allowed as long as it is less than half of what the organization does."

Wellspring donated $39.3 million to the Judicial Crisis Network between 2010 and 2016, according to the tax filings. The single largest contribution, $23.4 million, was made in 2016, the same year President Barack Obama nominated Merrick Garland, also a federal appeals court judge, to the Supreme Court following Justice Antonin Scalia's death. Garland's nomination would be blocked by Senate Republicans, who argued the winner of the 2016 presidential race should pick Scalia's replacement.

The Judicial Crisis Network said it spent more than $17 million in 2016 and 2017 to run ads against Garland's nomination and later in support of Neil Gorsuch, the federal appeals court judge nominated to the high court by Trump and confirmed by the Senate to replace Scalia.

Wellspring isn't required to disclose its donors. A list of its contributors for 2016, the latest year for which tax records are publicly available, excludes their names and addresses. It shows $32.2 million in contributions from eight separate sources. One donation was for $28.4 million, nearly 90 percent of Wellspring's total revenue for that year.

Neil Corkery declined to say how much Wellspring donated to the Judicial Crisis Network in 2017 and thus far in 2018. A message conveyed through Wellspring's office manager said that information will be available after the tax returns for those years are filed. The organization's 2016 return was submitted last November, so it may be months before new numbers are released.

The Judicial Crisis Network and Wellspring share another connection: a small, largely unknown company called the BH Group LLC. Wellspring paid the BH Group $750,000 for unspecified public relations work while the Judicial Crisis Network paid the company $947,000 for unspecified research, according to tax records for 2016. The BH Group donated $1 million to Trump's inaugural committee in December 2016.

Demand Justice was formed just a few months ago and is structured in such a way that it doesn't have to file annual tax returns. That's because it's "fiscally sponsored" by a tax-exempt social welfare organization called the Sixteen Thirty Fund. The Sixteen Thirty Fund files federal tax returns but doesn't have to disclose the identities of its donors.

Beth Kanter, a spokeswoman for the Sixteen Thirty Fund, said the organization "is nimble and can get projects off the ground quickly in a way that donors can't do on their own." In addition to Demand Justice, there are nearly 40 other initiatives sponsored by the Sixteen Thirty Fund, according to information filed with the District of Columbia's Department of Consumer and Regulatory Affairs.

Kanter said the Sixteen Thirty Fund "strictly follows all laws." The organization's president is Eric Kessler, the founder of Arabella Advisors and a former Clinton administration official. The executive director of Demand Justice is Brian Fallon, a former top aide to Senate Minority Leader Chuck Schumer, D-N.Y., who later advised Hillary Clinton's presidential campaign in 2016.

The Sixteen Thirty Fund's tax return for 2016, the latest available, lists more than 60 donors who gave $21 million in contributions that ranged from $5,000 to $7.3 million.

"We have a diverse set of donors that share our commitment to social justice," Kanter said.

Associated Press investigative researcher Randy Herschaft in New York contributed to this report.