Scotland finished their preparations for their World Cup finals debut with a winning flourish in front of a record home crowd of 18,555.
But Shelley Kerr’s side were made to work hard by Jamaica, who will be the lowest-ranked side in France.
Khadija Shaw fired the visitors into the lead before equally fine finishes from Erin Cuthbert and Caroline Weir gave Scotland a half-time advantage.
Sophie Howard allowed Shaw a second but made up for her error with the winner.
Scotland head into their opening group game at the finals, against England on 9 June, on the back of an unbeaten five-game run. They will also face Japan and Argentina.
It was a first defeat in seven for Jamaica, ranked 33 places below Scotland in 53rd, but Shaw in particular showed they could cause problems to group opponents Australia, Italy and Brazil.
Sweet music for Scots against Reggae Girlz
In front of a crowd four times bigger than the previous record for a home women’s international, the side known as the Reggae Girlz were intent on being party poopers.
Hue Menzies, their London-born coach of Scottish descent, had promised to “surprise a few people” despite Jamaica being the lowest-ranked side heading to the finals in France next month.
The Scots were tickling the ball about neatly in their pink change strips until Jamaica lived up to Menzies’ claim that they are “probably the most athletic team in the competition” by taking the lead after threatening on the break.
Shaw is currently without a club after leaving Florida Krush last year, but the quality of her powerful finish through the arms of goalkeeper Lee Alexander after Scotland lost possession suggests the 22-year-old ought to ensure many a suitor after the finals.
Scotland responded, with Weir and Little forcing goalkeeper Sydney Schneider to beat away a couple of powerful efforts, before Cuthbert burst into life with the kind of strike that has already brought the Chelsea forward a plethora of awards and plaudits this season.
Her thundering drive from 30 yards would rival her goal voted the best in this season’s Champions League and, five minutes later, Manchester City midfielder Weir added a sublime finish of her own with a curling free-kick.
It was all looking comfortable for Kerr’s side until half-time substitute Howard was dispossessed by Shaw, who strode forward elegantly before clipping the ball over Alexander for her 30th goal in 22 games.
The goal and a series of substitutions knocked the Scots out of their stride, but they regained their composure once Howard looped in a header to restore the lead from a corner.
Jody Brown, the 17-year-old US-based college striker tipped for the top, could not match the impact of Shaw up front for Jamaica after the goalscorer limped off with an injury.
Kerr’s Scots, though, emerged unscathed and victorious after an unprecedented send-off but knowing they must cut out the defensive errors if they are to make an impact in France.