It seems 'The Simpsons' has once again been ahead of its time, predicting Canada's free usage of cannabis 13 years before the country's dispensaries ran out of supplies by the second day of legalization.

In a 2005 episode called 'Midnight Rx', filmed during the show's 16th season, the conniving Mr Burns starts a chain reaction making prescription drugs affordable in Springfield, Illinois.

Homer and Grampa Simpson start smuggling cheaper drugs from Manitoba, Canada, and find that they've been lauded as heroes. On one of their future runs, they are joined by Apu and Ned.

In a 2005 episode called 'Midnight Rx', Homer Simpson and his pals journey to Manitoba, Canada, to get cheaper alternatives to their prescription drugs

While in Canada, Ned meets the Canadian version of himself - set with a curly afro - but instantly takes a disliking to him after his counterpart tries to give him a 'reeferino.'

Reeferino appears to be a doobie - also referred to as a joint.

'It’s legal here,' Canadian Ned tells his American counterpart. Ned quickly retorts: 'They warned me Satan would be attractive. Let's go!'

The Simpsons has predicted other historic occurrences before, most notably the eventual rise of Donald Trump as president.

The cartoon foretold a Trump presidency in a surreal episode where Bart is given a window into the future - and found a country brought to its knees by financial mismanagement and a crime wave ushered in by The Donald

In Bart to the Future, first aired in March 2000, a fortune teller gave Bart a glimpse of 2030 - just weeks after Trump vacated the White House.

While in Canada, Ned meets the Canadian version of himself but instantly takes a disliking to him after his counterpart tries to give him a 'reeferino'

The United States' neighbor to the north on Wednesday became the first industrialized nation to legalize the drug after a nearly century-long ban

The United States' neighbor to the north on Wednesday became the first industrialized nation to legalize the drug after a nearly century-long ban and a two-year push by the government of Prime Minister Justin Trudeau.

Most pot enthusiasts were exuberant about the end of prohibition, but a few expressed disappointment over not being able to buy the now-legal marijuana on the first day.

Others balked at the relatively high prices - ranging from $5.25 in Canadian dollars in Quebec to $18.99 in Saskatchewan per gram - compared to the black market that saw average prices plunge in the last year to $6.79 per gram.

But by the next day, all of their dispensaries had ran out of pot

In Ontario, Canada's most populated province, 38,000 orders for weed were processed in the first few hours Wednesday, while in neighboring Quebec 42,000 orders were processed in-store and online, smashing all expectations.

Supply shortages were reported in the provinces of Newfoundland and Saskatchewan, as well as in the Arctic territory of Nunavut.

Several online retailers including the Ontario government's pot portal, meanwhile, warned customers to expect shipping delays of up to five days as they worked late into the night filling orders.