Taylor Hill/Getty; Nicholas Hunt/Getty
Following Monday's episode of The Late Late Show, viewers noticed when Corden, 44, told a nearly-identical joke to one that the British comedian, 61, shared in his 2018 Netflix special, Ricky Gervais: Humanity.
While discussing new Twitter owner Elon Musk calling the social media platform a "town square," the television personality joked: "But it isn't, because if someone puts up a poster in a town square that says 'guitar lessons available,' you don't get people in the town [who] go, 'I don't want to play the guitar! I want to play the piano!'"
He continued, "Well, then that sign wasn't for you. It was for somebody else! You don't have to get mad about all of it."
In which James Corden basically does a Ricky Gervais joke word for word pic.twitter.com/8MfkrBo8Y0
— Rupert Myers (@RupertMyers) November 1, 2022
The segment went viral after viewers pointed out the similarities between Corden's joke and the one Gervais previously made.
"It's like going into a town square," Gervais joked in 2018, per CNN. "And there's a notice for guitar lessons and you go, 'But I don't f---ing want guitar lessons.'"
Andrew H. Walker/Getty Ricky Gervais
Gervais appeared to be taking the incident in stride when he responded to a Twitter user who asked if Corden received permission to use the joke.
"No. I reckon one of the writers 'came up with it' for him," Gervais tweeted. "I doubt he would knowingly just copy such a famous stand up routine word for word like that."
Following the social media outcry, Corden gave credit to Gervais for the joke.
Inadvertently told a brilliant Ricky Gervais joke on the show last night, obviously not knowing it came from him. It’s brilliant, because it’s a Ricky Gervais joke. You can watch all Ricky’s excellent specials on Netflix. J x
— The Late Late Show with James Corden (@latelateshow) November 1, 2022
"Inadvertently told a brilliant Ricky Gervais joke on the show last night, obviously not knowing it came from him," Corden wrote in a tweet on Tuesday. "It's brilliant, because it's a Ricky Gervais joke. You can watch all Ricky's excellent specials on Netflix."
Before the joke scandal, Corden came under fire after being banned from the popular NYC restaurant Balthazar. Keith McNally — who owns Balthazar in NYC — slammed Corden over his alleged behavior at the establishment and claimed the star was "the most abusive customer to my Balthazar servers."
"In the heat of the moment, I made a sarcastic rude comment about cooking it myself," he admitted. "It is a comment I deeply regret. I understand the difficulties of being a server. I worked shifts at restaurants for years."
Corden previously announced in April that he was leaving The Late Late Show. His tenure will conclude sometime next spring.
Never miss a story — sign up for PEOPLE's free daily newsletter to stay up-to-date on the best of what PEOPLE has to offer, from juicy celebrity news to compelling human interest stories.
The Late Late Show with James Corden airs weeknights (12:30 p.m. ET) on CBS.