Police say a man who had been locked in a Caboolture house, north of Brisbane, with a toddler, has been taken into custody.

An armed man who was holed up in a southeast Queensland house with a toddler has been arrested.

The child was rescued from the Caboolture home, north of Brisbane, on Thursday afternoon.

“The baby has just come out, I don’t know how old it it, it is close to two, 19-months,” a police spokeswoman told AAP.

“Ambulance has just taken the child and the mother for observation.

“I don’t know if he has any injuries, it doesn’t appear so.”

The man is believed to have fired at least one shot before police arrived at the home about 10.30am (AEST).

The mother, 26, escaped earlier in the day, but couldn’t take her child.

She was treated for minor head and facial injuries.

At this stage, it is not know what relationship the man has with the mother and child.

“He has been arrested but is yet to come out of the cordoned off area,” the spokeswoman said.