SACRAMENTO, Calif. (AP/CBS13) — California’s attorney general has dropped a lawsuit seeking the names and contact information of every person who used one of the state Republican Party’s unofficial ballot drop boxes.

In some counties with closely contested U.S. House races, the party used the boxes to collect ballots. While it’s legal in California to collect completed ballots and turn them in on behalf of voters, state law says only county election officials are allowed to deploy ballot drop boxes.

READ MORE: Boy, 8, Hailed A Hero After Discovering Baby Sister Unresponsive In Pool

State Attorney General Xavier Becerra and Secretary of State Alex Padilla initially ordered the party to remove the boxes. But they relented once the party made changes, including not labeling the boxes as “official.”

READ MORE: California GOP Claims Victory Over AG Becerra On Divulging Info From Unofficial Ballot Boxes

Still, Becerra vowed to keep investigating to make sure all of the ballots were counted. He asked the California Republican Party to turn over the location of each box plus the names and contact information for every voter who used one. Becerra sued when party officials refused to comply.

READ MORE: Man Apologizes After Video Shows Street Vendor Attacked

Friday, the attorney general’s office announced it was dropping the lawsuit because it was able to ensure that voters’ ballots were counted. In a written statement, the office said it relied on investigative efforts, cooperation with state and local election officials and a response to its questions by the party.

“We are confident that this election was safe and secure in California — as it was across the country,” the attorney general’s press office wrote in an email to reporters.

California Republicans have denounced Becerra’s investigation, saying they were following the law.

MORE NEWS: Folsom Shuts Sutter Street Down To Open Businesses

“As we said all along, this was just a political ploy by the Attorney General and the Secretary of State – and they lost,” California Republican Party spokesman Hector Barajas said.