Updated

James Corden admitted that he "inadvertently" told a Ricky Gervais joke on his show Monday night after the late-night host faced accusations of stealing it. 

"I inadvertently told a brilliant Ricky Gervais joke on the show last night, obviously not knowing it came from him," Corden tweeted from "The Late Late Show with James Corden" account. "It’s brilliant, because it’s a Ricky Gervais joke. You can watch all Ricky’s excellent specials on Netflix. J x." 

In his monologue Monday, Corden joked, "When you see Elon Musk talk about Twitter, he does this thing where he goes, ‘It’s the town square. 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 going: ‘I don’t wanna play the guitar!’ But that sign wasn’t for you, it was for somebody else — you don’t have to get mad about all of it."

Gervais noted the similarity with a joke he told in 2018 and wrote "The bit about the town square advert for guitar lessons is brilliant" in a since-deleted tweet that included Corden’s clip, according to The Hollywood Reporter. 

JAMES ORDEN BREAKS SILENCE ON ALLEGATIONS OF ABUSIVE BEHAVIOR AT NEW YORK RESTAURANT: ‘IT WAS UNGRACIOUS’ 

split photo of James Corden and Ricky Gervais

James Corden, left, told a joke in his Monday night monologue that Ricky Gervais, right, noted was very similar to one he told in a 2018 Netflix stand-up special.  (Ian Gavan/Nicholas Hunt)

During his 2018 stand-up special "Humanity" on Netflix, Gervais said Twitter is "like going into a town square, and seeing a big notice board that says, ‘Notice: Guitar lessons,’ and going: ‘I don’t f---ing want guitar lessons!’ … Fine! It’s not for you, then. Just walk away, don’t worry about it."

Late-night shows have a writing staff so it's unclear who actually pitched or wrote the joke or if they were aware of the Gervais special. 

The situation comes two weeks after Corden was accused of rude behavior to restaurant staff while dining in New York. He apologized on his show, saying he "deeply regret" making a "rude" comment to waitstaff at the restaurant after he had to repeatedly send back a dish his wife was allergic to. 

James Corden speaking about drama

Late-night host James Corden broke his silence about Keith McNally's accusations against him on his Oct. 24 show a week later, he told a joke almost identical to a Ricky Gervais one.  (CBS)

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

Restaurateur Keith McNally, who originally banned Corden from the restaurant earlier this month in a statement on Instagram, calling him a "Cretin of a man," then unbanned him after saying the comedian had apologized, wrote on Monday that he was "done with Corden."

Ricky Gervais at the 77th Golden Globes

Ricky Gervais hosting the Golden Globes. (Paul Drinkwater/NBCUniversal Media, LLC via Getty Images)

"I don't want to over-egg the pudding, but in Friday's London Times Corden flip-flopped and told a massive lie AGAIN," McNally wrote, including a quote from an interview last week in which Corden denied "screaming" at the waitstaff. 

He also called Corden’s apology on his late show "contrived and phony."

CLICK HERE TO GET THE FOX NEWS APP

"The actor will say anything to save his bacon," he wrote.