BERLIN — Esther Thiane, a student in Berlin, does not know yet if she wants to marry a man or a woman — but now she can decide without worrying about the legality of whatever she chooses.

Germany’s president, Frank-Walter Steinmeier, signed marriage equality into law on Thursday, and the nation’s first same-sex marriages are set to take place in October. Supporters like Ms. Thiane had a chance to celebrate in Berlin on Saturday at the Christopher Street Day Parade, an annual event named for the New York City street synonymous with gay pride.

Thousands of people participated in the parade, which one marcher, Marco Hirscher, 28, described as a “huge party for our rights.”