US Secretary of State Mike Pompeo faced ridicule online after his attempt to troll Nancy Pelosi using a meme from The Simpsons backfired.

Mr Pompeo posted a tweet showing Lisa Simpson sobbing with a piece of paper in an apparent reference to Ms Pelosi, who was filmed ripping up a copy of Donald Trump’s speech after his State of the Union address.

But Twitter users were quick to point out that Pompeo had missed the context of the scene.

In the episode Mr Lisa Goes to Washington, Lisa wins a trip to the US capital for her essay about what makes America great, before ripping up her speech when she witnesses political corruption take place.

After Mr Pompeo’s joke, some drew comparisons with Mr Trump’s impeachment trial, in which the President was accused of attempting to pressure Ukraine to investigate Democratic rival Joe Biden.

Bill Pascrell Jr, a member of the House of Representatives, pointed out Mr Pompeo’s mistake, saying: “Lisa loses her faith in democracy after seeing a corrupt politician selling out American values and liberty. Like your boss.”

Mr Pascrell’s tweet was liked by Yeardley Smith, who voices Lisa Simpson in the show.

Simpsons writer Bill Oakley added: “Mr. Secretary of State please do not ever ever ever use Simpsons material in your twitter or watch the show or refer to it in any way.”

Barack Obama’s former campaign manager Jim Messina added: “Hmm, I guess Mike Pompeo doesn’t know Lisa Simpson succeeds Trump as POTUS? [President of the United States].”

Another Twitter user said: “You’re trying to troll Nancy with the Simpson’s? Dude. You just played yourself. Self owns are the best.”

The Simpsons has made multiple political references previously and may even have predicted the advent of the Trump administration.

In an episode where Lisa herself has become the US commander-in-chief, she mentions casually: “We inherited quite the budget crunch from President Trump.”

The episode aired in March 2000, 16 years before Trump was elected as president.