Homosexuals can have the same rights as heterosexual married couples, Italy's highest civil court has ruled.
However it upheld a ban on gay marriage and said those celebrated abroad were not valid in Italy.
In a ruling welcomed by gay rights groups, the court said that homosexuals have the right to "a family life" and, "in specific situations," to "be treated the same as couples married by law."
However, homosexuals still cannot legally marry and "do not have the right to register a marriage celebrated abroad," it found.
The court was ruling on the case of a homosexual couple who had married in 2002 in The Hague and had asked to register the marriage in Latina, near Rome, where they are residents -- but had been refused by the local town council.
Their appeal against the council's decision was dismissed by the court.
In its ruling, the civil court said it had opened the way for homosexuals to have the same rights as married people because -- while gay marriage is illegal in Italy -- homosexual rights in Europe have evolved considerably.
The gay rights association Mario Mieli called the ruling "historic."
"It is clear that the law needs to urgently adapt to changes in society. We cannot wait any longer," it said in a statement.
The Italian Communist Party said the ruling "confirms that insisting on banning civil unions is a standpoint worthy of the Middle Ages."