Millions of people across the world took to the streets to celebrate the start of the new year, in a blaze of fireworks.

But the mood was tinged with sadness after the traumatic and tumultuous time seen in 2016.

Berlin launched a huge firework display from near the Brandenberg Gate, for instance – but it was marked by the memory of the attack on a Christmas market in recent days.

Security was stepped up across Europe and Britain. Officials including London mayor Sadiq Khan said they were confident that the right mix of safety and enjoyment had been achieved.

In pictures: World celebrates New Year's Eve 2016 Show all 16 1 /16 In pictures: World celebrates New Year's Eve 2016 In pictures: World celebrates New Year's Eve 2016 Fireworks explode over the Sydney Harbour Bridge and the Sydney Opera House on December 31, 2016 Getty Images In pictures: World celebrates New Year's Eve 2016 The SkyTower firework display during New Year's Eve celebrations on January 1, 2017 in Auckland, New Zealand. Getty Images In pictures: World celebrates New Year's Eve 2016 People release white balloons, carrying their wishes, to celebrate the New Year at Prince Park Tower in Tokyo On January 1, 2017. AFP/Getty Images In pictures: World celebrates New Year's Eve 2016 People attend the count down event to celebrate the arrival 2017 new year during New Year's Eve celebration at Beijing Olympic Park in China, 31 December 2016. EPA In pictures: World celebrates New Year's Eve 2016 New Year Eve's fireworks illuminate the Marina Bay in Singapore, 1 January 2017. EPA In pictures: World celebrates New Year's Eve 2016 South Koreans strike a bell during New Year celebrations in South Korea, 1 January 2017. EPA In pictures: World celebrates New Year's Eve 2016 Fireworks explode over Victoria harbour during New Year celebrations in Hong Kong on January 1, 2017. AFP/Getty Images In pictures: World celebrates New Year's Eve 2016 Fireworks explode over Moscow's Kremlin complex during New Year celebrations in Moscow on January 1, 2017. AFP/Getty Images In pictures: World celebrates New Year's Eve 2016 Fireworks explode above the pyramids during New Year's day celebrations on the outskirts of Cairo, Egypt, January 1, 2017. Reuters In pictures: World celebrates New Year's Eve 2016 Fireworks explode over the Al-Nusoor Square during the New Year celebrations in Baghdad, Iraq January 1, 2017. Reuters In pictures: World celebrates New Year's Eve 2016 Fireworks are seen above Pyongyang, North Korea, for New Year on January 1, 2017. Reuters In pictures: World celebrates New Year's Eve 2016 Fireworks explode at the Burj Khalifa, the world's tallest building, and surrounding skyscrapers to mark New Year in Dubai AP In pictures: World celebrates New Year's Eve 2016 Fireworks explode behind the Brandenburg Gate at midnight on January 1, 2017 in Berlin, Germany Getty Images In pictures: World celebrates New Year's Eve 2016 Revellers watch a fireworks show over the Arc de Triomphe monument, from the Champs-Elysees avenue as part of the New Year celebrations on January 1 , 2017 in Paris. AFP/Getty Images In pictures: World celebrates New Year's Eve 2016 Fireworks light up the London skyline and Big Ben just after midnight on January 1, 2017 Getty Images In pictures: World celebrates New Year's Eve 2016 Fireworks light up the sky during the Hogmanay New Year celebrations in Edinburgh. PA

Celebrations in Istanbul were marred by mass shooting at a nightclub which killed at least 39 people. The gunman was still at large.

In Russia – which in one sense celebrates the New Year a number of times because of its various timezones – 2017 was welcomed with a stunning firework and light show.

But it also came with a warning from Putin that 2016 had been a "difficult year" and that people should work harder to make 2017 a better one.

Meanwhile, New York saw problems of a different kind when singer Mariah Carey's performance in Times Square was beset by technical difficulties.

People leave a nightclub in Istanbul after it was attacked on 1 January (AP)

Tonga and Samoa were among the first places in the world to welcome the new year.

Sydney in Australia celebrated by unleashing its biggest fireworks display in history.

More than a million crowded around its famed harbour and opera house to watch firecrackers and flaming starbursts fill the night's sky.

The show paid homage to Prince and David Bowie and was set to a musical medley inspired by the late singers.

The seven tons of fireworks launched from barges on the harbour also included a “Willy Wonka moment” in tribute to the late actor Gene Wilder's most famous role,.

Japan celebrated at 3pm GMT, with temple bells sounding at midnight as families flocked to shrines for the country's biggest holiday.

Beijing and Shanghai, China's two largest cities, passed New Year's Eve at 4pm GMT in a state of security lockdown, according to Chinese media reports citing police.

Two years ago, more than 30 people died in a deadly stampede on Shanghai's waterfront, where 300,000 people had gathered to watch a planned light show.