Portugal is in the south-west corner of Europe, far from the more populated central area of the continent. This makes that travelling by train to the country is time consuming, and even became more time consuming and complicated recently.
Until March 2020 there was a direct night train (Sud-Express) from Hendaye, at the French-Spanish border, to Lisboa. However with the Covid-19 pandemie this train was suspended. Also the night train (Lusitania) between Madrid and Lisboa was suspended. With the most severe effects of the Covid crisis fading away, the Portuguese railways (CP) wanted to reinstate those trains, but the Spanish railways (Renfe) refused and took the opportunity to abandon all night trains and put the rolling stock out of service. As a result there are no direct train services anymore between Portugal and Madrid and the rest of Europe.
The only remaining options to travel by train to Portugal require several changes of train and staying overnight in at least one location en route. This page gives a summary of the current (December 2022) possibilities.