Republican presidential candidate Donald Trump, speak and states that "President Barack Obama was born in the United States" during a gathering with military leaders and veterans at the new Trump International Hotel in Washington, Friday, Sept. 16, 2016. (AP Photo/Manuel Balce Ceneta)

NEW YORK (AP) — In a videotaped midnight apology, Donald Trump declared “I was wrong and I apologize” after being caught on tape making shockingly vulgar and sexually charged comments.

Yet he also defiantly dismissed the revelations as “nothing more than a distraction” from a decade ago and signaled he would close his presidential campaign by arguing that rival Hillary Clinton has committed greater sins against women.

“I’ve said some foolish things,” Trump said in a video posted on his Facebook page early Saturday. “But there’s a big difference between the words and actions of other people. Bill Clinton has actually abused women and Hillary has bullied, attacked, shamed and intimidated his victims.”

Trump’s 90-second statement capped a jarring day that threatened to sink the billionaire businessman’s White House campaign, and sent Republicans into a panic as the Nov. 8 election nears and the candidates prepare for Sunday’s crucial debate.

One by one, outraged GOP lawmakers condemned Trump’s comments in a 2005 video obtained and released Friday by The Washington Post and NBC News.

In the video, Trump is heard describing attempts to have sex with a married woman. He also brags about women letting him kiss and grab them because he is famous.

“When you’re a star they let you do it. You can do anything,” Trump says in the previously unaired comments. He adds seconds later: “Grab them by the p—-. You can do anything.”

House Speaker Paul Ryan, R-Wis., said he was “sickened” by Trump’s remarks. Ryan revoked an invitation for Trump to appear at a GOP event Saturday in Wisconsin.

But like most of the many lawmakers who said Trump’s words were reprehensible, Ryan did not pull his endorsement.

“I hope Mr. Trump treats this situation with the seriousness it deserves and works to demonstrate to the country that he has greater respect for women than this clip suggests,” Ryan said.

For some Republican officials, Trump had finally gone too far.

“You, sir, are the distraction,” Utah Sen. Mike Lee said in a video posted to his Facebook page after Trump’s apology. “Your conduct, sir, is the distraction.”

Lee called on Trump to abandon his campaign, saying it was time for the Republican Party to “expect more. There is no need for us to settle.”

Clinton, who did not campaign Friday while she prepared for the debate, said on Twitter that Trump’s comments were “horrific.” She added: “We cannot allow this man to become president.”

For more than a year, Trump’s outrageous and often outlandish comments have given Republicans fits. GOP officials have at least nominally thrown their support behind him, with some notable exceptions, including nearly all the party’s living past presidents and White House nominees.

Some of that support has been driven by a belief that Trump needs to at least be competitive in the November election in order to give candidates in down-ballot races a chance to win. The question many Republicans now face is whether the balance will now tip and supporting Trump becomes the riskier position.

Even before Friday’s revelations, Trump was struggling to steady his campaign. He had an uneven performance in the first debate and in the following days, bewilderingly feuded with a beauty queen he had shamed for gaining weight.

That incident stunned Republicans, particularly given Trump’s desperate need to shore up support among women. But the businessman’s comments about the Miss Universe contestant pale in comparison to his words in the newly released recording.

On it, Trump is caught on a live microphone while talking with Billy Bush of “Access Hollywood.” The candidate is heard saying “I did try and f— her. She was married.” He also uses graphic terms to describe the woman’s body and says he frequently tries to kiss beautiful women.

Trump issued a short apology Friday afternoon, saying he was sorry “if anyone was offended.” As he did hours later, he shifted attention toward the Clintons, saying former President Bill Clinton “has said far worse to me on the golf course — not even close.”

Trump has spent months hinting he might make the Clintons’ marital issues and their handling of the former president’s affairs a campaign issue. Earlier this week, Trump said he didn’t plan to raise the matters in Sunday’s town hall-style debate, but his video suggests he may have changed his mind.

The Republican desperately needs a standout performance in the debate. With his invitation to Wisconsin rescinded, he said he would spend Saturday in New York preparing for the debate.

Indiana Gov. Mike Pence, Trump’s running mate, planned to replace Trump at the Wisconsin event. Coming off a widely praised performance in Tuesday’s vice presidential debate, Pence ignored questions shouted by reporters in Rossford, Ohio, where he was campaigning Friday with his daughter.

A person familiar with Pence’s thinking said Pence was “beside himself” and that his wife was furious. That person was not authorized to share the private discussion and spoke on condition of anonymity.

As Friday became consumed by Trump’s vulgarity, Republicans bemoaned another lost opportunity to chip away at Clinton.

The WikiLeaks organization posted what it said were thousands of emails from Clinton campaign chairman John Podesta, including some with excerpts from speeches she gave to Wall Street executives and others. She has declined to release the speeches despite demands from Trump.

The excerpts include Clinton seeming to put herself in the free-trade camp, a position she has retreated from. In a talk to a Brazilian bank in 2013, she said her dream was “a hemispheric common market, with open trade and open borders.”

But a distracted Trump didn’t seem to notice, focusing instead on pushing attention toward Bill Clinton’s infidelities even as he apologized for his intemperate remarks.

“We will discuss this more in the coming days,” he said at the end of his midnight video. “See you at the debate on