Peru’s Jefferson Farfan celebrates first-half goal in Lima. (Rodrigo Abd/Associated Press)

What began 980 days ago in a crude, little venue on the north shore of a Southeast Asian island ended Wednesday in the ruckus of an earth-moving national stadium sitting in a South American capital, the last of almost 900 matches to determine which 31 countries would join Russia at the 2018 World Cup.

A Thai referee named Sivakorn Pu-udom began the long march to Moscow on that late afternoon in March 2015, sounding his whistle to mark the start of a qualifier between East Timor, a former Portuguese colony, and the visiting team from Mongolia. More than 2 1/2 years later, the adventure ended in the Santa Beatriz neighborhood of Lima, where French ref Clement Turpin’s last blast of his whistle certified Peru’s 2-0 victory over New Zealand in the second leg of an international playoff.

In between, Germany, Brazil and many of the other elites secured passage with only trivial disruption; Iceland and Panama crashed the party for the first time; and Argentina escaped elimination on the last day of South America’s unforgiving scrum by the narrow width of Lionel Messi’s magical left foot.

Several familiar figures fell short this fall: Italy, Netherlands, United States, Chile, Ghana and Cameroon. No time in recent history have so many established programs missed the World Cup. The Italians are four-time champions; the Dutch finished second in 2010 and third in ’14; and the Americans had not stumbled since 1986.

There’s so much unattached talent, American executives are exploring the possibility of hosting an unofficial tournament or a series of matches at U.S. venues in late May or early June. (Call it the soccer NIT, perhaps?)

Peru filled the final void in the real competition and, in the process, ended an unfathomable, 36-year lapse between appearances in the grand tournament. Aside from the two newcomers, no country had waited as long as the Peruvians. (Egypt was next, at 28 years.)

The reaction to Jefferson Farfan’s goal in the 28th minute shook Estadio Nacional de Lima — yes, actually shook the ground, according to the seismology center in neighboring Chile.

Defender Christian Ramos added a second goal midway through the second half to crush the dreams of the Kiwis, gallant underdogs coached by Seattle-born Anthony Hudson, who might have an MLS job waiting for him in Denver.

The outcome — which followed a 0-0 draw last week in Wellington, New Zealand — ushered a fifth South American team into the World Cup and improved the continent’s odds of ending Europe’s string of three consecutive titles (Italy, Spain and Germany).

With the field set, the soccer world will focus on to the Dec. 1 draw at the State Kremlin Palace, which will set the eight four-team groups and potential heavyweight pairings in the elimination stages.

The top seeds are set —  the host country and the top seven qualifiers from FIFA’s October rankings: Germany, Brazil, Portugal, Argentina, Belgium, Poland and France.

A potential Group of Death: How about Brazil, Spain, Sweden and Nigeria? Despite carrying the cringe-worthy qualities of a variety show, the draw will attract a global audience and hold almost as much drama as a penalty-kick tiebreaker in the late rounds.

The tournament will run June 14 to July 15, beginning and ending in Moscow and visiting 10 other cities, stretching from St. Petersburg in the north to Sochi in the south and Kaliningrad on the Baltic to Yekaterinburg on the edge of the Urals.

Seven months before the opener, who is the favorite? The same team that raised the trophy at Maracana in Rio de Janeiro 3 1/2 years ago: Germany.

Since then, Die Mannschaft advanced to the semifinals of last year’s European Championship, won this summer’s FIFA Confederations Cup in Russia with an experimental squad and swept through Group C in Europe’s World Cup qualifying with 10 victories in 10 matches and a 43-4 scoring margin.

“We’re the only team that almost has to get worse,” Coach Joachim Loew said recently of his team’s run of success and towering expectations. “To repeat such a performance is incredibly difficult. We have to have an unbelievably strong squad where every player is in top shape every minute of every day.”

Just eight countries have won the World Cup, and the likelihood of an outsider joining the exclusive society seems far-fetched. There are two legitimate candidates: Portugal, the 2016 Euro champion featuring Real Madrid superstar Cristiano Ronaldo, and Belgium, an immensely talented unit that has yet to prove its mettle on the largest stages.

For those without natural rooting interests, there is a clear, cuddly choice for adoption: Iceland.

With a population of 335,000, it’s the smallest nation to qualify in the World Cup’s 88-year history. That’s about the same number of people living in Corpus Christi, Texas.

While this is its first trip to the World Cup, it’s not Iceland’s first time in the spotlight. Last year, in their first European Championship appearance, the Icelanders advanced out of group play and upset England in the round of 16. In their World Cup qualifying group, they finished ahead of, among others, Croatia, Ukraine and Turkey.

Regardless of what happens this summer, their legacy is secure. Not only have they given hope to small countries, they’ve exported the Viking Clap to stadiums around the globe — slow, overhead applause with primal grunts that increase with frequency until hitting the crescendo.

For Iceland and the other 30 teams that endured the rigors of qualifying — and the thousands of miles and many months of matches it entailed — the destination is all that matters. Roster selection and tactics will come later.

In Peru, President Pedro Pablo Kuczynski declared Thursday a national holiday.

“Thanks to our warriors,” he said, “for giving us this joy.”

QUALIFIED NATIONS

CONCACAF: Mexico, Costa Rica, Panama.

Africa: Egypt, Senegal, Morocco, Nigeria, Tunisia.

Asia: Iran, Japan, Saudi Arabia, South Korea, Australia.

South America: Brazil, Argentina, Uruguay, Colombia, Peru.

Europe: Russia (host), Germany, Spain, France, Portugal, Belgium, England, Switzerland, Sweden, Iceland, Croatia, Denmark, Serbia, Poland.

WORLD CUP DRAW POTS

Pot 1: Russia, Germany, Brazil, Portugal, Argentina, Belgium, Poland, France.

Pot 2: Spain, Peru, Switzerland, England, Colombia, Mexico, Uruguay, Croatia.

Pot 3: Denmark, Iceland, Costa Rica, Sweden, Tunisia, Egypt, Senegal, Iran.

Pot 4: Serbia, Nigeria, Australia, Japan, Morocco, Panama, South Korea, Saudi Arabia.

Teams from the same region cannot end up in the same group, except those from Europe.