A woman who gave birth nine months after a three-night tryst took a German hotel to court to find out the identity of the likely father of her child.

The woman, who has not been identified, gave birth to a son, Joel, after the encounter in Halle, eastern Germany, in 2010.

She wanted to force the hotel to reveal her lover's identity and address as she was seeking child support.

All she knew about him was that his first name was Michael.

The hotel refused, arguing that it had no legal obligation to hand over the personal data of one of their former guests, according to German newspaper the Abendzeitung.

A court has now rejected her legal bid, saying that she had no legal right to demand the data from the hotel and did not provide enough information to be sure of the man's identity.

The court argued it could also breach the privacy of four men named "Michael" who were registered at the hotel at the time.

The judgment was reached last October but was only recently made public.

According to the court, the father’s right to self-determination of his own information took precedence over the woman’s right to child support.