MIAMI — April Freeman, the Democratic candidate running in Florida’s 17th Congressional District, died on Sunday, according to her husband, David Freeman, who announced her death on his wife’s Facebook page on Monday.

“It’s with great sadness that I feel I must inform all of you that my beloved wife April passed away suddenly last night,” Mr. Freeman wrote. “To all of her family and friends here on Facebook, my heart aches with you.”

Mr. Freeman later told The Sarasota Herald-Tribune that Ms. Freeman died apparently of a heart attack. She was 54.

Ms. Freeman was running in the solidly Republican 17th District in southwestern Florida, where the G.O.P. incumbent, Representative Tom Rooney, is retiring. Her Republican opponent, State Senator Greg Steube, offered condolences to Ms. Freeman’s family on Twitter.