LAS VEGAS — In at least three campaign appearances over the past two weeks, Joseph R. Biden Jr. has told a similar story as he tries to revive his campaign in states with more diverse voters. On a trip to South Africa years ago, he has said, he was arrested as he sought to visit Nelson Mandela in prison.

“This day, 30 years ago, Nelson Mandela walked out of prison and entered into discussions about apartheid,” Mr. Biden said at a campaign event in South Carolina last week. “I had the great honor of meeting him. I had the great honor of being arrested with our U.N. ambassador on the streets of Soweto trying to get to see him on Robbens Island.”

Mr. Biden referred to his own arrest twice more in the next seven days, including at a campaign stop here on Tuesday where he spoke of getting arrested in South Africa between efforts to coax his wife to marry him. That proposal occurred in 1977, both Bidens have said.

But if Mr. Biden, then a United States senator from Delaware, was in fact arrested while trying to visit Mr. Mandela, he did not mention it in his 2007 memoir when writing about a 1970s trip to South Africa, and he has not spoken of it prominently on the 2020 campaign trail. A check of available news accounts by The New York Times turned up no references to an arrest. South African arrest records are not readily available in the United States.