Back to the Future predicted baseball team the Chicago Cubs would end their World Series drought - and missed out by just a year.

On Wednesday night, the Cubs defeated the Cleveland Indians 8-7 at Progressive Field in Cleveland, Ohio to win US baseball's World Series final by four games to three.

The Cubs had not won the title in 108 years, and had not won the National League pennant in 71 years, until finally winning both in 2016, which represented record spells of failure in Major League Baseball.

Bill Murray was among the Cubs fans at Progressive Field on Wednesday night

But in 1989's Back to the Future: Part II, Michael J Fox's Marty McFly visited 2015. The film predicted flat screens and drones, but what most excited Marty was a World Series win for the Chicago Cubs against the fictitious Miami Gators.

Now, nearly three decades later, the Cubs have finally ended their hoodoo, just 12 months later than predicted in BTTF2. And the man who penned the screenplay and imagined this unlikely scenario is Bob Gale, a lifelong baseball fan of the St Louis Cardinals. Back to the Future trilogy director Robert Zemeckis, who together with Gale came up with the film's story, is a native Chicagoan.

Gale said the prediction grew out of the plot line in which primary character Marty McFly gets the idea from another character of going back in time to make money on sports betting.

"What better way to give him the idea than with a really outrageous scenario, which is the Cubs win the World Series?" said Gale during an interview with sports network ESPN.

"It's a double joke because they win the World Series against Miami - which [didn't have] major league baseball in 1989... The second prediction, people don't automatically realise when they watch the movie today, but we were predicting there would be a major league team in Miami."

That team, the Miami Marlins, didn't materialise until 1993, and was originally called the Florida Marlins.

Michael J Fox congratulated the Cubs on Twitter, as he paraphrased his Back to the Future character by writing: "Only off by a year, not bad. Congrats Cubs. This is so heavy."

Meanwhile, here's Marty and his Cubbies' moment: