New South Wales Police said that a 34-year-old man and a 38-year-old woman were declared dead after being taken to hospital.
The 50-year-old gunman at the heart of the 16-hour crisis, Iranian refugee Man Horan Monis, was pronounced dead in hospital.
Gunfire at the Lindt Chocolat Cafe in central Sydney’s busy Martin Place shopping area prompted police to move in just after 2am local time.
Four people were taken to hospital following the siege, including a police officer who suffered wounds to his face from gunshot pellets.
Police commissioner Andrew Scipione told reporters that 17 hostages had been accounted for in total, including five who escaped early in the attack.
Mr Scipione said: “This was an isolated incident, it is an isolated incident.
“It was the act of an individual. This should never change or destroy the way of our life. This won’t change our lives, this will not change the things we hold dear in this country.”
He said the Lindt cafe had been secured and no explosive devices were found.
He urged people not to “speculate” about what had happened, adding that police believed more lives could have been lost had they not taken action.
“Events that were unfolding inside the premises led them to the belief that now was the time to actually deploy, and they did,” he said.
“I understand there were a number of gunshots that were heard, which caused officers to move towards an emergency action plan.”
Reports suggested Royal Australian Regiment commandos had entered the building after the gunman started firing shots.
Police confirmed a number of hostages had “traumatic injuries” and some had “medical conditions”.
Uninjured hostages are expected to be interviewed as part of a critical incident investigation by police.
Australian prime minister Tony Abbott said: “Australians awoke to the news this morning that the siege in Martin Place had ended.
“Our thoughts and prayers are with the families of the two deceased hostages, the wounded, and the other hostages.
“I commend the courage and professionalism of the New South Wales Police and other emergency services involved.”
The end of the siege came soon after the hostage taker was named as self-styled Muslim cleric Monis.
Born Manteghi Bourjerdi, Monis arrived in Australia in 1996 as a refugee.
He had attracted attention in recent years by writing offensive letters to the families of Australian soldiers killed in Afghanistan. Dubbed the “hate sheikh”, he was sentenced to 300 hours of community service for writing the letters.
Monis was also reportedly on bail as an alleged accessory to the murder of his ex-wife and for a string of sex claims.
During the stand-off he was said to have demanded to have a flag of the Islamic State militant group delivered to the cafe.
However, his former lawyer Manny Conditsis told ABC: “This is a one-off random individual. It’s not a concerted terrorism event or act. It’s a damaged-goods individual who’s done something outrageous.”
Adam Houda, a solicitor who had also represented Monis, described him as “mad as a cut snake”.
Lindt & Sprungli, the company whose cafe was at the centre of the hostage crisis, said it was “profoundly saddened and deeply affected” by the death of innocent people.
“Our thoughts and feelings are with the victims and their families who have been through an incredible ordeal, and we want to pay tribute to their courage and bravery.”
Martin Place, scene of the siege in Sydney, is named after James Martin, who was born in Midleton, Co Cork, in 1820.
His parents emigrated to New South Wales the following year, offered work there by the new governor, Thomas Brisbane, who had been commanding the British garrison at Fermoy at the time of his appointment to rule the colony.
James Martin was three times premier of New South Wales and later chief justice.