ALBANY — A young, married-with-kids Republican running for an upstate Senate seat abruptly ended her candidacy Wednesday, confessing to an extramarital fling — that began just days ago.

Gia Arnold said she decided she couldn’t continue her campaign for the western New York seat because of a one-night stand she had this month.

And the 24-year-old mom of three announced her decision in rather dramatic fashion — via a startling e-mail sent to the media at 12:35 a.m.

“I have made personal decisions that have ultimately resulted in the necessity of my stepping down from the campaign,” Arnold wrote.

“I participated in an extramarital affair beginning in August of this year. It was an excuse for an escape from an already declining marriage. I cannot regret the decisions I have made, but I can admit to being happier presently than before.

“It is for my ex-husband, my children, my family and friends that I must publicly admit to my actions, as I believe honesty and integrity are of utmost importance in life.”

She included her cellphone number so that “any constituent that wants to speak with me has that ability.”

When contacted by The Post, Arnold said she had an affair with a friend on Aug. 1 after “an unhappy marriage led to poor decisions” and was dropping out because she wanted to take control of the situation before the news leaked out.

She insisted she was not under any pressure to quit. “My character will be judged, and that’s expected,” Arnold said.

Since the primary is less than a month off, Arnold’s name will still appear on the ballot. But she said she won’t be doing any campaigning.

A conservative and Tea Party favorite, Arnold was set to do battle against North Tonawanda Mayor Robert Ortt in the Sept. 9 Republican primary. The western New York native decided in February to run for the 62nd senate seat occupied by Republican Sen. George Maziarz.

Maziarz spent 19 years in the Senate before abruptly announcing last month that he won’t seek another term — just as the feds began investigating his campaign expenditures. Maziarz told reporters he had been planning retiring for a while. Maziarz has endorsed Ortt as his successor

On her Facebook page Arnold said she will donate the $3,186 remaining in her campaign account to the charity that receives the most votes on her social-media page.

Arnold said she was unsure whether she would try to run again for public office.