A 30-year-old man has been arrested on suspicion of making threats to kill and false imprisonment after a "hostage situation" which lasted more than 24 hours.
More than 40 houses were evacuated in Shaw, Oldham, as a precaution after officers were called to reports of a man armed with a gun inside a home, along with a woman and two children at 3.15am on Tuesday.
Armed police entered the property in Pemberton Way at shortly after 4.50am this morning and Greater Manchester Police said a 27-year-old woman was removed without injury,
Two children were safely outside the house, police added.
Chief Superintendent John O'Hare said: "We would like to thank the local community, in particular those who have had to leave their homes, whilst we worked to resolve this situation.
"Thankfully the hostage situation was safely resolved and the woman was brought to safety and the man arrested."