Tens of thousands of people, including Sweden's prime minister, have participated in Stockholm's annual gay pride parade, walking along streets sprinkled with balloons and rainbow flags.

Prime Minister Stefan Lofven said Saturday's 4.3-kilometer (2.6-mile) route was "two hours of happiness and love," in a reference to the duration of the parade.

Crowds of onlookers watched as participants danced to loud techno and pop music in the parade that organizers said attracted some 45,000 participants.

As the first day of the Stockholm Pride parade reached its planned end, heavy rain poured over the rally. Several other lawmakers, including opposition leader Anna Kinberg Batra of the Moderate Party, also participated.

First held in 1998, it is considered the largest such event in the Nordic region.