A mother threw her newborn baby and toddler from a two-storey window into the arms of a neighbour after her apartment caught fire.

Police say the blaze started when the 27-year-old woman was cooking in her kitchen in Sydney on Thursday evening.

She was unable to get out of the front door due to the flames so she grabbed her two-day old baby boy and his two-year-old brother and rushed to the window where a neighbour came to her aid.

Police say the fire started while the woman was cooking Credit: 7 News

The neighbour, who has not been named, told 9 News he was watching the football when he saw the smoke coming out of the house.

He said he dragged mattresses from his home and put them on the ground below the window before catching the children in his arms.

Superintendent Adam Dewberry said: “This could have been a horrific tragedy.

“Neighours did a fantastic job, putting mattresses on the floor and catching the baby, it was a really good support network from the neighbours.”

The mother then took refuge on the window sill until help arrived.

Emergency services treat the mother Credit: 7 News

The children were uninjured and the woman was rescued from the window shortly afterwards when firefighters arrived. She was taken to hospital for treatment for smoke inhalation and cuts to her feet.