After the interval, it was all Fiji, with Gabiriele Lovbalavu crossing before a penalty made it a 17-point advantage after 51 minutes.
From there however, Samoa came roaring back into the game.
First, former Hurricanes and Highlanders prop Anthony Perenise dotted down after a patient build-up inside the Fijian 22, before Perez went over to make it a one-try game.
A try to TJ Ioane was then converted by Michael Stanley to tie the contest with just seven minutes to play, but Ben Volavola kept Fiji in front with a 75th minute penalty.
However, replacement first-five Patrick Faapale stepped up to keep Samoa's unbeaten run against their Island counterparts alive with a last-minute penalty, leaving the teams to share the points.
In the other Pacific Nations Cup game held today, Tonga beat Canada 28-18.