President Trump on Tuesday directed Republicans to “fight hard” in court after California’s top election and law enforcement officials, both Democrats, ordered the state GOP to remove unofficial ballot boxes from various locations in three counties or face prosecution.  

“You mean only Democrats are allowed to do this? But haven’t the Dems been doing this for years? See you in court. Fight hard Republicans!” Trump tweeted Tuesday, responding to a tweet from Los Angeles Times reporter Sarah Parvini, who shared the newspaper’s story about the unofficial ballot boxes.

California Secretary of State Alex Padilla on Monday ordered the state GOP to remove unofficial ballot drop-off boxes set up at churches, gun shops and other locations in Fresno, Orange and Los Angeles counties by Thursday. Attorney General Xavier Becerra went further to say those behind the GOP effort could face prosecution, arguing the boxes threaten election security and must come down.

CALIFORNIA REPUBLICANS REFUSE TO REMOVE BALLOT BOXES, SLAM STATE'S $35 MILLION 'TEAM BIDEN' CONTRACT 

California GOP spokesman Hector Barajas said the party no longer will label its ballot drop boxes as “official" to avoid confusion with those used by county registrars but may expand their use past just three of the most hotly contested congressional districts, even as state officials say they're illegal.

“It gives voters another opportunity to be able to turn in their ballots if they choose to do so," he said. “This is just another option.”

“We are doing nothing illegal,” Fresno County Republican Chair Fred Vanderhoof also told local news site GVWire. “The whole ballot harvesting law is purposely designed very loosely so the Democrats can cheat, which they are doing in large numbers. They can do ballot harvesting, but we can’t. That’s what they’re saying. So they’re hypocritical.”

The state GOP drop boxes are a new version of “vote harvesting," which is legal in California and allows party volunteers to collect multiple ballots and deliver them to election officials. Though state election officials argue anyone who delivers ballots for others must put their name on those ballots and sign them, a 2018 state law bars ballots from being disqualified if they fail to include these signatures.

Republicans say that means their volunteers can collect ballots in drop-off boxes and turn them in without signing their names. Barajas said a staff member or volunteer has been designated to take any ballots collected to the county registrar about three times a week.

“We are just working with the rules that Democrats put in front of us,” Barajas said. “We’re basically playing on the chessboard they laid out.”

In this Oct. 5, 2020, file photo, California Secretary of State Alex Padilla, left, and Orange County Registrar of Voters Neal Kelley hold a news conference on Orange County's comprehensive plans to safeguard the election and provide transparency in Santa Ana, Calif. (AP Photo/Damian Dovarganes, File)

CALIFORNIA AG SENDS CEASE AND DESIST LETTER TO STATE GOP AMID REPORTS ABOUT UNOFFICIAL BALLOT BOXES 

The 2018 law was drafted before the midterm election by California Assemblywoman Lorena Gonzalez, a San Diego Democrat, who now argues it calls for a voter to give their ballot to a person, “not to put it in an unofficial box sitting outside somewhere.” She said Tuesday that she’d be “happy to rewrite the law” so state Republicans “will be punished for their behavior.”

California Gov. Gavin Newsom, a Democrat, tweeted Monday that the state Republican Party “reeks of desperation,” as is “willing to lie, cheat, and threaten our democracy all for the sake of gaining power.”

“These unofficial drop boxes aren’t just misleading, they are illegal,” he said.

U.S. Rep. Devin Nunes, R-Calif., appearing on the Central Valley radio station KMJ’s “The Ray Appleton Show,” had this response for Newsom: "Screw you! You created the law, we’re going to ballot harvest.”

California Assembly Minority Leader Marie Waldron also tweeted that, “This ballot collection box issue is simple: Republicans trying to expand voter access; Dems trying to suppress votes.”

CALIFORNIA HIRES DEMOCRATIC OPERATIVES FOR 'GET OUT THE VOTE' EFFORT

This comes as Barajas also called out the California secretary of state for awarding a $35 million state contract to a public relations firm tied to the Vice President Joe Biden’s campaign. The firm SKD Knickerbocker was tasked in August with running a non-partisan “Vote Safe California” campaign urging people to vote during the pandemic, but Republicans argue there’s a conflict of interest.

U.S. Reps. James Comer, R-Ky., Rodney Davis, R-Ill., and Jody Hice, R-Ga., sent a letter to Patricia Layfield, Inspector General of the U.S. Election Assistance Commission, requesting an investigation of the "highly questionable" contract, which mentions President Trump by name. Comer is the ranking member of the House Committee on Oversight and Reform.

The California GOP rolled out its boxes in conjunction with the start of early voting last week. Barajas wouldn't divulge how many were deployed or specify locations, other than to say they were at party and candidates' offices, churches and gun shops in three congressional districts — one in the Central Valley, another north of Los Angeles and a third in Orange County. All three districts saw Democrats defeat Republican incumbents in 2018.

The fight over how votes should be submitted has raged between Republicans and Democrats in California for years, with the GOP generally trying to curtail the right to vote and Democrats looking to encourage greater turnout. The Democratic majority in the state Legislature has expanded voting options to include casting ballots by mail, putting them in an official secure drop box or giving them to a friend or family member to return to the county election office.

CLICK HERE TO GET THE FOX NEWS APP

Republicans have opposed some of those efforts, including allowing voters to give their ballots to others, warning it will lead to fraud. But now Republicans are using those laws to defend collecting ballots in these unofficial boxes.

Fox News’ Evie Fordham, Alex Pfeiffer and The Associated Press contributed to this report.