BOSTON (AP) — U.S. Sen. Elizabeth Warren is raking in millions in campaign donations as she looks ahead to a re-election bid next year.

According to an Associated Press review of Warren's latest campaign finance reports, the Massachusetts Democrat took in a hefty $5.9 million in campaign contributions from January 2015 through the end of 2016.

Contributions to Warren spiked in the final three months of last year, when she took in more than $1 million. That period from Oct. 1 through the end of December included the election of Republican President Donald Trump.

Nearly all of Warren's contributions came from individual supporters, with just $34,000 from political action committees and other groups.

Warren ended 2016 with $4.8 million left in her campaign account. She began the two-year period with just over $1.6 million in cash on hand.

Warren has been a top Democratic foil to Trump.

She assailed Trump during the 2016 campaign, calling him "fraudster-in-chief," among other things. Trump responded via Twitter, labeling her "goofy Elizabeth Warren" and referring to her as "Pocahontas," a reference to Warren's claim to have Native American ancestry.

Warren has used Trump to help spur donations to her campaign. She sent out a fundraising email to supporters last week saying that deep-pocketed conservative groups were already running ads against her.

"I will never stop fighting against a right-wing system hell-bent on stripping the rights of working people and tilting the law to favor big business and billionaires like Donald Trump," Warren said in the email.

Massachusetts Republicans have dubbed Warren a "hyperpartisan bully more interested in scoring political points than delivering actual results."

Potential GOP opponents in 2018 include former Boston Red Sox pitching star Curt Schilling, a strong Trump backer. Schilling has yet to say whether he will run or not.

Warren, a former Harvard Law School professor, won the Senate seat in 2012 by beating incumbent Republican Sen. Scott Brown in her first political contest.

Warren, 67, hasn't ruled out a future White House run but has said she is focused on the 2018 senate race.

Fellow Massachusetts Democratic U.S. Sen. Edward Markey ended 2016 with $2 million in his campaign account. Markey isn't up for re-election until 2020.