Typically, when an aircraft lands on a different country than its departure, it has to land on an international airport. There many services are provided like customs, passport control etc, to make the entrance to the country legal.
But what happens on an unpowered aircraft? (i.e. sailplane, paraglider, hangglider etc).
These aircraft may be forced to cross a border and not be able to return but to the country of origin. Landing at an airport (let alone international), may not be possible. As an example consider a paraglider that is blown back to the lee side of a mountain.
These aircraft usually don't file a flight plan, they are not equipped with a transponder, may not have radios to communicate with ATC, and possibly may not be detected by radars.
How can the pilot make their arrival formal, their stay legal and eventually return to the origin country with out problems? Is there any law protecting pilots in such cases, or will they be treated as illegal immigrants?
In general, if this ever happen to someone, what is the first action they have to take, and who shall they contact?
Consider crossing an "unfriendly" border. A EU citizen getting from an EU country to another obviously will not have any problems. But visiting a country that a visa is needed, or that in general you are not allowed entrance seems more troublesome.