Being an outspoken voice against the Trump administration has turned into a gold mine for Sen. Kamala Harris.

In her first three months on the job, the California Democrat pulled in about $1 million in political contributions, mostly in small increments of $20 or less.

A good deal of the credit goes to a $300,000 digital media ad campaign that her operatives have kept running ever since the November election.

Normally, it would take a Washington newcomer like Harris years to build up the national presence to mount such a operation. But Harris’ election-night declaration that she “will fight for our ideals” hit a chord with Democrats across the country and became one of the first rallying cries of the “resistance” movement.

“People saw it as a sign of hope and they wanted to do something,” said Harris political adviser Sean Clegg.

So in came the flood of small donations, from roughly 48,000 individuals. It’s enabled Harris to start spreading the wealth around to fellow Democratic senators who are up for re-election next year.

“This has nothing to do with her state base — this is about raising her profile for the 2020 or 2024 presidential race,” said Republican Bill Whalen, a research fellow at the Hoover Institution.

“This is about the battle for being one of the ‘mentioned’ as a contender.”

The irony here is that Harris’ rise to national fame probably wouldn’t have happened if Hillary Clinton had been elected.

But in both politics, as in comedy, timing is everything.

San Francisco Chronicle columnists Phillip Matier and Andrew Ross appear Sundays, Mondays and Wednesdays. Matier can be seen on the KPIX TV morning and evening news. He can also be heard on KCBS radio Monday through Friday at 7:50 a.m. and 5:50 p.m. Got a tip? Call (415) 777-8815, or email matierandross@ sfchronicle.com. Twitter: @matierandross