Daniel Hulshizer, Associated Press
Gov. James McGreevey announces resignation Thursday. His wife was at his side.

TRENTON, N.J. — In a stunning declaration, Gov. James E. McGreevey announced his resignation Thursday and acknowledged that he had an affair with another man. "My truth is that I am a gay American," he said with his wife by his side at a nationally televised news conference.

"Shamefully, I engaged in adult consensual affairs with another man, which violates my bonds of matrimony," the twice-married father of two said. "It was wrong, it was foolish, it was inexcusable."

McGreevey, a Democrat, said his resignation would be effective Nov. 15.

McGreevey, 47, refused to answer questions at the Statehouse news conference. He said "it makes little difference that as governor I am gay," but added that staying in office and keeping the affair and his sexual orientation secret will leave the governor's office "vulnerable to rumors, false allegations and threats of disclosure."

"Given the circumstances surrounding the affair and its likely impact upon my family and my ability to govern, I have decided the right course of action is to resign," he said without elaborating on what the circumstances were.

Two sources close to McGreevey, both speaking on condition of anonymity, said the man involved threatened McGreevey several weeks ago that unless he was paid "millions of dollars," the man would file a lawsuit against the governor charging him with sexual harassment.

Senate President Richard J. Codey, a Democrat, will become acting governor and serve out the remainder of McGreevey's term, which ends in early 2006. If McGreevey were to leave office before Nov. 15, a special election would be held.

Former Republican Gov. Christie Whitman said McGreevey "made a courageous decision" but criticized his plan to wait until Nov. 15 to leave office, saying it "smacks of politics." She said it "would be in the best interests of the state" for the governor to step aside immediately.

Rumors had been circulating for several years that McGreevey was gay, reaching the level of open hints on New Jersey talk radio shows.

A Roman Catholic, McGreevey had a daughter with his first wife, Kari, who lives in British Columbia with the child. He has another daughter with his current wife. McGreevey spokesman Micah Rasmussen declined to answer any questions about the future of McGreevey's marriage.

As a candidate and governor, the former altar boy proudly discussed his Catholic faith but publicly disagreed with church leaders over his support for abortion rights and same-sex partnerships. He pushed for the state's domestic-partnership law, which went into effect this year.

In an announcement that at times was deeply introspective, McGreevey referred to his lifelong struggles with his sexuality.

"Throughout my life, I have grappled with my own identity, who I am," he said. "As a young child, I often felt ambivalent about myself, in fact, confused."

"At a point in every person's life, one has to look deeply into the mirror of one's soul and decide one's unique truth in the world, not as we may want to see it or hope to see it, but as it is," McGreevey added.

McGreevey rose from suburban mayor to state chief executive by his tenacious pursuit of party politics, maintaining a power base days after he narrowly lost to Whitman in 1997.

McGreevey never truly stopped that campaign until he won in November 2001, beating Republican Bret Schundler by 15 percentage points.

Despite inheriting a $5 billion budget deficit, he steadfastly refused to boost income taxes for most New Jerseyans. He instead raised taxes on millionaires, casinos and cigarettes and provided millions of dollars worth of property tax rebates that have been showing up in residents' mailboxes in recent weeks.

Among those caught up in recent scandals were his first chief of staff and former counsel; a top Democratic fund-raiser and former high school classmate; and real estate developer Charles Kushner, McGreevey's biggest campaign contributor, who was charged with trying to thwart a federal campaign-finance investigation by luring a grand jury witness — his own brother-in-law — into a compromising position with a prostitute and sending video and photos to the man's wife.

New Jersey residents expressed disbelief at the news. "We thought it was a joke," said Jeanne Montana, who heard the announcement on her car radio on the way to Atlantic City.

"Get out of here," Jim Nerney said when told the news by an Associated Press reporter at a rest stop. Convinced it was true, he shook his head.

Gay rights groups expressed support and compassion for McGreevey, but their reactions were tinged with sorrow because McGreevey announced his resignation just as he became the nation's first openly gay governor.

"It is a very sad to thing to watch. It is kind of stunning, sad to me that in 2004 people are still having to struggle because of homophobia in society to come to terms with who they are," said Kevin Cathcart, executive director of Lambda Legal.