IOWA CITY, Iowa (AP) — A Democratic candidate for Iowa Secretary of State said Tuesday she would refund a major contribution from a national political group after learning it was mistakenly given and accepted in violation of Iowa law.

Deidre DeJear's campaign said it would send back the $5,000 contribution to EMILY's List "as soon as possible" after learning of the violation from The Associated Press hours earlier.

The gift broke an Iowa law that bars political action committees from donating to candidates for state office during the legislative session, and prohibits candidates from accepting them during that period. The law applies not only to sitting lawmakers but also to candidates for the Legislature and other state offices, including secretary of state.

The prohibition extends to candidates for governor for 30 days after the session and is one of the few strict Iowa campaign finance laws, which allow for unlimited donations from individuals. The goal is to limit political action committees from influencing official actions and legislation.

DeJear, a small business owner and former organizer for President Barack Obama's re-election campaign, is running against Jim Mowrer in the June 5 primary. The winner will challenge incumbent Secretary of State Paul Pate, a Republican, in the November election. The office oversees elections and business filings.

EMILY's List, which backs female Democratic candidates who support abortion rights, made the donation to DeJear from its political action committee on March 8, days before it publicly endorsed her campaign. The group disclosed the contribution to the Iowa Ethics and Campaign Finance Disclosure Board as required on March 14. Lawmakers have been in session all year, and expect to adjourn in coming weeks.

A spokesperson for EMILY's List said the group learned of its mistake from the AP on Tuesday and immediately took steps to fix it, including by asking the DeJear campaign for a refund.

DeJear campaign spokeswoman Cynthia Sebian-Lander said the campaign reached out to the ethics board after being contacted by AP and confirmed the mistake.

"We then moved to remedy the situation immediately and are refunding the check as soon as possible," she said.

EMILY's List and two other groups, NARAL and Collective PAC, promoted a fundraiser last week for DeJear in Washington D.C. and sought online contributions for that event as well. Sebian-Lander said it's possible additional donations will have to be refunded, saying the campaign is "doing our due diligence and checking our previous contributions" ahead of a May 19 filing deadline.

She said that the ethics board told the campaign that mistakenly accepting PAC contributions during legislative sessions was a "common occurrence" in Iowa politics. It's unclear what that comment is based on and Megan Tooker, director of the ethics board, didn't respond to requests for comment Tuesday.

EMILY's List announced March 12 that it was endorsing DeJear , praising her work starting her own marketing business, providing financial education to thousands through United Way of Central Iowa, and organizing African-American voters for Obama's re-election campaign in 2012.

"Deidre DeJear has spent her career helping Iowa's small business owners and making sure Iowans' voices are heard at the ballot box," EMILY's List President Stephanie Schriock said in a statement then.

DeJear, 32, said that she was honored to have the endorsement, noting that EMILY's List has empowered hundreds of women to run for office.

Questions about the donation came the same day that DeJear announced endorsements from 26 sitting Democratic state lawmakers and dozens of local officials.

Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.