New Year’s Eve in Australia’s two largest cities will be under the watchful eye of a massive police and security presence, with more than 1 million revellers expected in the centre of Sydney and at least half that in Melbourne.

Dozens of officers armed with Colt M4 semi-automatic rifles will be on duty in Sydney. Riot squad officers with the military-style semi-automatic rifles will be equipped to launch a tactical armed assault in response to a high-risk situation such as a vehicle attack or mass stabbing.

They will be joined by officers on horses, in the air, in the water and the police dog unit.

The police operation had been planned for more than a year to ensure partygoers enjoy New Year’s Eve safely, the NSW police deputy commissioner Jeff Loy said on Friday.

“We know big crowds will take advantage of our spectacular harbour again this year and we want them to be able to celebrate safely,” he said. “Sydney is renowned as the world’s premier New Year’s Eve destination so let’s make sure it’s memorable for all the right reasons.”

Melbourne’s city centre would be in “lockdown” to protect revellers, police said.

Extra bollards would be in place to protect inner-city partygoers from potential attacks and several key streets would be closed to vehicles, the acting commissioner, Andrew Crisp, said on Friday.

“In relation to the CBD itself, we basically lock down the centre of the city,” Crisp said. “People will see additional concrete bollards which will better protect those people that will congregate in the main area of Flinders and Swanston streets.”

The city was shaken in the week before Christmas when Saeed Nori allegedly ran down pedestrians on Flinders Street.

Other streets in Docklands would also be locked down, with vehicles banned and concrete bollards in place.

Victoria’s premier, Daniel Andrews, urged visitors and locals to celebrate the new year in the city but warned that unacceptable behaviour would not be tolerated. “People need to use their common sense and also look out for each other,” he said.

Police said they would be on hand to stamp out any drunk and disorderly behaviour.

“We want to see everyone enjoy themselves but to also reflect on their own behaviour and the actions of those close to them,” Crisp said. “It is why we’re focusing on anti-social behaviour, violence, and drink and drug driving.”

Specialist squads including the water police, mounted officers and the public order squads would be deployed if needed, he said.

Sydney’s $7m fireworks display will this year include a rainbow waterfall cascading from the Harbour Bridge to celebrate the legalisation of marriage equality in Australia.

Many roads will be closed, including the Harbour and Anzac bridges, and authorities in both cities have urged the public to use public transport.

More than 4,500 extra services will be running in Sydney and more than 500 extra trains in Melbourne.

The New South Wales minister Matt Kean has warned Sydneysiders to report parties and promoters that fail to deliver on ticketed events.

“When you’ve been looking forward to an event all year, and hand over large sums of your heard-earned money, you rightly expect a fun night out,” Kean said.

“However, in recent years we’ve instead seen some notorious events where parties have been cancelled at the last minute, or closed down because there were too many attendees.”

Kean said partygoers were protected by Australian consumer law and could demand refunds or compensation if events did not match advertising.