Gerry Adams, the prominent Irish politician, accused the Obama administration of singling him out after he was stopped at the gates of the White House on Tuesday for a lengthy security check when he arrived for a St. Patrick’s Day reception.

Mr. Adams, the president of the Sinn Fein political party and a member of the Irish Parliament, has been a guest at the reception since the mid-1990s when he took part in the Northern Ireland peace process.

“I arrived at the proper time and had all the appropriate documentation,” he said in a telephone interview. But the guard told him there was a “an issue of ‘security.’ ”

“I wasn’t disturbed when they said they had a problem because that happens all the time,” he said, adding that he felt as if he were in a receiving line, greeting the other guests as they filed past him.

But after waiting more than an hour, Mr. Adams left. “It’s my strong view that Sinn Fein representatives are on a list of some sort,” he said. “We’re given extra scrutiny; we’re given extra searches. It’s not proper, it’s not courteous, and it’s not fair.”

The Secret Service apologized for the delay, which it attributed to an “administrative input error.” A spokesman for the Secret Service, Robert K. Hobak, said it regretted not resolving the situation “in a more timely manner.”

Though Sinn Fein began as the political arm of the Irish Republican Army, Mr. Adams, 67, has long denied reports that he was involved with the I.R.A. Those allegations resurfaced in 2014, when the police in Northern Ireland arrested and questioned him in connection with the murder of Jean McConville, a 37-year-old Belfast widow and mother of 10, who wasabducted and killed by the I.R.A. in 1972. No charges were ever brought against Mr. Adams.

Representative Peter T. King, a Long Island Republican and supporter of the Irish republican movement, said the episode was “totally inexcusable.”

While he acknowledged that Mr. Adams’s name “might be on a list for things that happened 20 or 30 years ago,” any confusion should have been cleared up in a few minutes, especially given that Mr. Adams had been a familiar figure at the White House since President Bill Clinton first welcomed him there in what was then a controversial gesture.

Last year, Mr. Adams complained that the State Department canceled his meeting with the deputy secretary of state, Antony J. Blinken, to pressure Sinn Fein on the issue of welfare reform in Northern Ireland. Mr. Adams later met with another State Department official.

On Wednesday, Mr. King joined 13 Republican and Democratic lawmakers in sending a letter of protest to the White House chief of staff, Denis R. McDonough.

“It is nothing short of astonishing that one of the principal architects of the peace process would not be allowed to attend a reception to which he was invited,” the lawmakers wrote.

The St. Patrick’s Day party is normally a lighthearted affair, with Mr. Obama and Vice President Joseph R. Biden Jr. offering toasts.

When Mr. Obama reminded his guests that this would be his last party as president, he added, “Well, I mean, we may meet in a pub in Dublin or something.”

Earlier on Tuesday, Mr. Obama interjected a political note into the “Friends of Ireland” luncheon at the Capitol, calling on leaders of both parties to condemn the violence that has erupted at Donald J. Trump’s campaign rallies.

NY Times