Scotland’s women will head to the World Cup having broken records as well as barriers. That 18,555 turned up at Hampden Park for this pre-tournament farewell against Jamaica smashed the previous best home attendance figure of 4,098. Understandably pre-finals optimism is high.

Defensive wobbles as Jamaica were seen off by the odd goal in five will have to be rectified before Scotland face England in Nice on 9 June. Still, for Shelley Kerr and the Scotland team – making a tournament where their male counterparts continually cannot – this felt like a positive occasion.

Victory merely added gloss to the scene and sense that Kerr’s side have been pioneers in respect of interest levels.

Only days after the raucous backdrop for a men’s Scottish Cup final between Hearts and Celtic, the Hampden vibe for only the second Scotland women’s appearance here in history was considerably more serene. Not that there was anything wrong with that. Nicola Sturgeon, Scotland’s first minister, was on hand for a pre-match presentation to survivors of the country’s first women’s international, against England in 1972. Those players did not receive caps – none did, in fact, until 1998 – with the Scottish FA of a mind belatedly to alter that situation. It seems obvious to infer that the success of this class of 2019 has played a large part in the governing body modernising its approach.

It had been generally lost in the pre-match build-up that Jamaica are also preparing for a World Cup appearance. The visitors punctured Scottish expectation of a straightforward, successful send-off within 15 minutes. The cheap concession of possession by the Scots on the edge of their own penalty area was followed by a half-baked Jennifer Beattie challenge on Chantelle Swaby. The one player in the Jamaica team the Scots would not have wanted the ball to drop to was Khadija Shaw. When it did, the forward fired a 20-yard drive high beyond Lee Alexander.

It would be a surprise if Shaw’s World Cup appearances are not sufficient to earn her a lucrative move to Europe. Such an outcome would complete a stunning rise for the 22-year-old, who has encountered the personal tragedy associated with the death of four brothers, three amid gang-related violence.

Scotland’s responses arrived via Caroline Weir, who tested Sydney Schneider with a swerving effort from 25 yards, and Kim Little, yet generally the visitors’ physicality was troubling Kerr’s team until the superb equaliser delivered by Erin Cuthbert. The Chelsea midfielder strode forward from midfield before unleashing a terrific drive from 25 yards. Hampden, so unaccustomed to such marquee moments from those in Scotland shirts during recent times, rose in acclaim of a fabulous goal.

There was more cause for celebration before half-time. In completing a hat-trick of counter-attacks, Weir planted a 19-yard free-kick past Schneider. Cuthbert’s trickery had drawn the earlier foul. The goal was fitting reward for Weir, who had been Scotland’s outstanding performer of the opening period.

A calamitous start to the second half by the hosts allowed Shaw to profit for a second time. Scotland’s captain, Rachel Corsie, played a free-kick to Sophie Howard, who had entered the fray after the interval. Howard’s stumble allowed Shaw to steal in; she ran 40 yards before clipping the ball home.

Howard’s salvation arrived courtesy of a free header from Weir’s corner. This marked the defender’s first Scotland goal. A further boost arrived for the hosts when the prolific Shaw was replaced immediately after Howard’s positive intervention.

In proving how even supposedly straightforward occasions can deliver problems, the Scottish FA will face questions after photos of lengthy queues outside Hampden at kick-off emerged on social media. Such a situation is strange for a stadium that was some 35,000 below capacity and the attendance had been widely predicted. By full-time those still inside offered applause as Kerr addressed them. Onwards to France.