Days before the election, voters in a Fairfax County Senate district received a campaign mailer that calls Republican candidate Patrick Forrest “openly homosexual” and says he is endorsed by the Gay and Lesbian Victory Fund.

The mailer calls Forrest a “liberal Republican” and says he supports illegal immigration reform, worked for President Obama’s transition team and has voted in Democratic primaries.

“A liberal Republican like Patrick Forrest is a greater threat to the conservative agenda than a Democrat will ever be,’’ it said on a copy of the mailer obtained by The Post late Friday.

Forrest, who is openly gay, has accused his opponent, longtime Democratic Sen. Janet Howell, of making an issue of his sexual orientation for months. But he declined to comment Saturday on the specifics of the mailer.

Forrest would say only that he got into the race to be an “independent voice” in the state Senate.

The mailers were sent just four days before the crucial legislative elections in which Republicans are trying to take the back the upper house.

The return address of the mailer is Our Heritage USA in Lynchburg, but the organization and street address do not appear to exist.

Howell said Saturday that she did not know who sent the mailers — one of which was addressed to her husband.

“It’s disgusting and despicable,’’ she said. “It’s not the way campaigns should be run.”

Her campaign delivered a letter to the Forrest campaign Saturday morning in which she told him she was trying to find the organization responsible and would be reporting the situation to the State Board of Elections.

“As you know, I deplore political tactics that personally disrespect candidates or their family members,’’ she wrote. “Our campaign, as should all campaigns, sticks to the issues that are important to the community and impact our families.’’

The Democratic Party also sent out a mailer that voters received Friday, saying Forrest “stands with the tea party, not our kids” for supposedly wanting to cut education funding.