FRANKFURT (Reuters) - German gas importer Uniper, its Finnish majority-owner Fortum and the Finnish and German governments have agreed in principle on a bailout solution to rescue the company from financial distress caused by thinning Russian gas supply, three people familiar with the matter told Reuters on Friday.

The deal would include the German government taking a stake and providing funding for Uniper, they said.

(Reporting by Reuters bureaus, editing by Kirsti Knolle)