It's one of the greatest upsets in sporting history. On Monday, Iceland defeated England in the second round of the Euro 2016 soccer tournament, 2-1, to progress to a quarter-final match against host nation France.

The historic magnitude of the result is hard to understate. This is Iceland's first appearance in any major tournament. Their country's population (just a bit over 300,000 people) could fit into one midsized English city. Some estimates suggest that almost 10 percent of the nation was following the team around in France. Their players include a part-time filmmaker and itinerant farmers.

Iceland was going up against one of the most recognized teams in the world, whose players are all lavishly paid stars in the English Premier League. But an incredible, gusty performance by the Icelanders, some of whom are journeymen who ply their trade in England's lower leagues, won the day.

The defeat — a seismic disaster for England — almost immediately led to gallows humor on social media, with many reflecting on the nation's earlier exit from Europe. On Thursday, a majority of voters in Britain, especially in England and Wales, voted to leave the European Union, a decision that has already degraded Britain's credit rating, sent the pound to historic lows and cratered the U.K.'s stock market. (To be sure, Wales is still in the tournament and will take on Belgium in the quarterfinals.)

The Brexit jokes were already beginning before the match started:

A petition for a rematch — a play on an existing online petition for a second referendum on the E.U. that has received millions of signatures — started going around.

But it wasn't enough, and Iceland came back from a 1-0 deficit to win the match. The online schadenfreude was relentless, including these tweets from whistleblowing operation Wikileaks.

More gags about Iceland, which faced dire financial crisis less than a decade ago, and its advantage over an another island nation:

There was mirth about the grim surge in racial abuse toward Poles living and working in Britain:

And the complicated political wrangling the vote for Brexit has triggered in Britain:

There was a pun on a hapless English midfielder's name ...

... and jokes about Viking invasions:

Finally, Donald Tusk, current president of the European Council, the E.U.'s executive body, buried the dagger into England's forlorn European adventure.