Visitors to Baku invariably depart Azerbaijan with unnerving memories of crossing roads in the face of kamikaze local motorists.

Pedestrians hoping for longevity require the sort delicately calibrated balance of caution and aggression showcased so superbly on the pitch by Aaron Ramsey, Gareth Bale and the rest of Robert Page’s impressively streetwise side on Wednesday night.

With Ramsey and Bale issuing a timely reminder that form may be temporary but class is permanent, Wales safely negotiated a potentially awkward Euro 2020 crossroads at this far-flung junction of Europe and Asia.

Page’s team were so good that Bale got away with an extraordinary penalty miss as they reached the verge of the knockout stages while presumably prompting an uncomfortable Turkish inquest.

Perhaps anxious not to be entirely upstaged by Joe Biden and Vladimir Putin’s summit in Geneva, Turkey’s power hungry president, Recep Tayyip Erdogan, had snaffled a prominent VIP seat. In hindsight it probably did not make the desired photo opportunity.

Erdogan and his Azerbaijani counterpart, Ilham Aliyev, are close pals and the ties between their countries deep-rooted; as the sun began to set over the south Caucasus, Bale and company might have imagined they were in Istanbul rather than Baku.

Bar the 400-strong band of travelling Wales fans, the 30,000 crowd were rooting for Senol Gunes’s side. Yet as his players kicked off under Erdogan’s watchful gaze, Turkey’s coach possibly felt a little exposed.

Connor Roberts celebrates with Harry Wilson after scoring Wales’s second goal, deep in added time
Connor Roberts (right) celebrates with Harry Wilson after scoring Wales’s second goal, deep in added time. Photograph: Dan Mullan/Getty Images

Gunes’s side came into the tournament labelled as “dark horses” but their failure to muster any sort of attacking threat as they surrendered to Italy in last Friday’s opening Group A fixture has placed him under a degree of pressure infinitely more uncomfortable than Azerbaijan’s humidity.

Such edginess can only have been exacerbated by the sense Wales were anything but out of their depth by the shores of the Caspian Sea. Page’s decision to deviate again from his previously tried and trusted back three and deploy a four-man defence soon looked inspired.

If Turkey’s had clearly improved from last Friday against Italy, they remained overly tentative and timid in the face of Page’s bold high press and Daniel James’s scorching left-wing advances.

As Bale’s exquisite through-balls conjured two fine chances narrowly missed by Ramsey the principal Welsh concern centred on their enduring vulnerability to set pieces, corners in particular.

Turkey’s president, Recep Tayyip Erdogan, and Azerbaijan’s president, Ilham Aliyev, arrive to watch the game
Turkey’s president, Recep Tayyip Erdogan, and Azerbaijan’s president, Ilham Aliyev, arrive to watch the game. Photograph: Anadolu Agency/Getty Images

Page’s players camouflaged it by remaining on the front foot whenever possible, with Ramsey’s invaluable knack of making late, impeccably timed dashes into the box unnerving Turkey. There were odd cameos when Gunes’s side enjoyed decent possession, exchanging a few slick one-twos, but whenever James, Bale and Ramsey assumed possession, their opponents’ body language screamed self-doubt.

Before kick-off Burak Yilmaz, the 35-year-old Lille striker and Turkey captain, revealed his side “were broken” and “fragile” in the wake of their Italian dissection and, by half-time, Ramsey had revelled in undoing much of the emergency mental repairs undertaken by Gunes. Another flash of beautifully weighted brilliance from Bale illuminated the Azeri night and suddenly the Juventus midfielder accelerated into the area and was seamlessly chesting down and then half‑volleying Wales into a richly deserved lead.

As Yilmaz missed an inviting half-chance amid audible boos Gunes appeared distinctly uneasy. He cannot exactly have been looking forward to his post‑match meeting with Erdogan.

Goodness knows how the crowd might have reacted had Bale converted the penalty he subsequently won rather than putting it high on such an arcing trajectory it would be no surprise were the ball to have flown east across the Caspian and eventually landed in Turkmenistan’s Karakum Desert.

Turkey sensed destiny had thrown them a lifeline and the power balance duly altered beyond recognition. Suddenly Wales struggled to touch the ball, let alone hold on to it, but Page kept sufficient cool to introduce the defensively minded Ethan Ampadu, while Ben Davies made some vital interceptions.

It was, though, Ramsey who would contribute the evening’s decisive tackle, his immaculately timed intervention costing Mert Mulder an equaliser before Danny Ward’s extraordinary save denied Merih Demiral.

The Fiver: sign up and get our daily football email

Yilmaz deliberately provoked a heated altercation but Wales’s streetwise aggression was not only too controlled to allow them to fall into that trap but facilitated Bale’s atonement for the penalty courtesy of his creation of Connor Roberts’s stoppage-time goal.

Erdogan likes to see himself as a latter day sultan but, by now, all authority rested with Wales.